Re: RFR: 8270317: Large Allocation in CipherSuite [v5]

2021-07-23 Thread Xue-Lei Andrew Fan
On Fri, 23 Jul 2021 17:08:11 GMT, Clive Verghese wrote: >> src/java.base/share/classes/sun/security/ssl/CipherSuite.java line 972: >> >>> 970: boolean found = false; >>> 971: CipherSuite cs; >>> 972: if ((cs = cipherSuiteNames.get(name)) != null && >>> !cs.su

Re: RFR: 8270317: Large Allocation in CipherSuite [v7]

2021-07-23 Thread Clive Verghese
> ### Benchmark results > > I have benchmarked 3 cases. > > 1. The current situation. > > Benchmark > (cipherSuite) Mode CntScore Error Units > CipherSuiteBench.benchmarkCipherSuite > TLS_AES_256_GCM_SHA384 av

Re: RFR: 8270317: Large Allocation in CipherSuite [v6]

2021-07-23 Thread Volker Simonis
On Fri, 23 Jul 2021 17:11:30 GMT, Clive Verghese wrote: >> ### Benchmark results >> >> I have benchmarked 3 cases. >> >> 1. The current situation. >> >> Benchmark >> (cipherSuite) Mode CntScore Error Units >> CipherSuiteBench.b

Re: RFR: 8270317: Large Allocation in CipherSuite [v5]

2021-07-23 Thread Clive Verghese
On Fri, 23 Jul 2021 17:05:58 GMT, Xue-Lei Andrew Fan wrote: >> Clive Verghese has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Remove for loop from validValuesOf > > src/java.base/share/classes/sun/security/ssl/CipherSuite.java line 972:

Re: RFR: 8270317: Large Allocation in CipherSuite [v5]

2021-07-23 Thread Xue-Lei Andrew Fan
On Fri, 23 Jul 2021 16:52:38 GMT, Clive Verghese wrote: >> ### Benchmark results >> >> I have benchmarked 3 cases. >> >> 1. The current situation. >> >> Benchmark >> (cipherSuite) Mode CntScore Error Units >> CipherSuiteBench.b

Re: RFR: 8270317: Large Allocation in CipherSuite [v6]

2021-07-23 Thread Clive Verghese
> ### Benchmark results > > I have benchmarked 3 cases. > > 1. The current situation. > > Benchmark > (cipherSuite) Mode CntScore Error Units > CipherSuiteBench.benchmarkCipherSuite > TLS_AES_256_GCM_SHA384 av

Re: RFR: 8270317: Large Allocation in CipherSuite [v5]

2021-07-23 Thread Clive Verghese
> ### Benchmark results > > I have benchmarked 3 cases. > > 1. The current situation. > > Benchmark > (cipherSuite) Mode CntScore Error Units > CipherSuiteBench.benchmarkCipherSuite > TLS_AES_256_GCM_SHA384 av

Re: RFR: 8270317: Large Allocation in CipherSuite [v4]

2021-07-23 Thread Clive Verghese
On Fri, 23 Jul 2021 05:52:25 GMT, djelinski wrote: >> Clive Verghese has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Add blank space before and after the for loop > > src/java.base/share/classes/sun/security/ssl/CipherSuite.java line 97

Re: RFR: 8270317: Large Allocation in CipherSuite [v4]

2021-07-22 Thread djelinski
On Thu, 22 Jul 2021 19:01:02 GMT, Clive Verghese wrote: >> ### Benchmark results >> >> I have benchmarked 3 cases. >> >> 1. The current situation. >> >> Benchmark >> (cipherSuite) Mode CntScore Error Units >> CipherSuiteBench.b

Re: RFR: 8270317: Large Allocation in CipherSuite [v3]

2021-07-22 Thread Clive Verghese
On Thu, 22 Jul 2021 18:50:08 GMT, Xue-Lei Andrew Fan wrote: >> Clive Verghese has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Add allowed and default lists > > src/java.base/share/classes/sun/security/ssl/CipherSuite.java line 866: > >>

Re: RFR: 8270317: Large Allocation in CipherSuite [v3]

2021-07-22 Thread Xue-Lei Andrew Fan
On Thu, 22 Jul 2021 18:37:53 GMT, Clive Verghese wrote: >> ### Benchmark results >> >> I have benchmarked 3 cases. >> >> 1. The current situation. >> >> Benchmark >> (cipherSuite) Mode CntScore Error Units >> CipherSuiteBench.b

Re: RFR: 8270317: Large Allocation in CipherSuite [v4]

2021-07-22 Thread Clive Verghese
> ### Benchmark results > > I have benchmarked 3 cases. > > 1. The current situation. > > Benchmark > (cipherSuite) Mode CntScore Error Units > CipherSuiteBench.benchmarkCipherSuite > TLS_AES_256_GCM_SHA384 av

Re: RFR: 8270317: Large Allocation in CipherSuite [v3]

2021-07-22 Thread Clive Verghese
> ### Benchmark results > > I have benchmarked 3 cases. > > 1. The current situation. > > Benchmark > (cipherSuite) Mode CntScore Error Units > CipherSuiteBench.benchmarkCipherSuite > TLS_AES_256_GCM_SHA384 av

Re: RFR: 8270317: Large Allocation in CipherSuite

2021-07-22 Thread Clive Verghese
On Thu, 22 Jul 2021 00:11:56 GMT, Xue-Lei Andrew Fan wrote: >> Updated Benchmarks in Throughput mode >> >> ### Current >> >> Benchmark >> (cipherSuite) Mode Cnt Score Error Units >> CipherSuiteBench.benchmarkCipherSuite

Re: RFR: 8270317: Large Allocation in CipherSuite [v2]

2021-07-21 Thread Xue-Lei Andrew Fan
On Wed, 21 Jul 2021 23:58:15 GMT, Clive Verghese wrote: >> ### Benchmark results >> >> I have benchmarked 3 cases. >> >> 1. The current situation. >> >> Benchmark >> (cipherSuite) Mode CntScore Error Units >> CipherSuiteBench.b

Re: RFR: 8270317: Large Allocation in CipherSuite

2021-07-21 Thread Clive Verghese
On Thu, 22 Jul 2021 00:11:56 GMT, Xue-Lei Andrew Fan wrote: >> I am currently looking into the JFR profiles to identify why there is a >> difference in benchmarks with regards the different cipher suits in the >> current version vs the arraylist. > I guess the garbage collection plays a role h

Re: RFR: 8270317: Large Allocation in CipherSuite

2021-07-21 Thread Xue-Lei Andrew Fan
On Wed, 21 Jul 2021 23:51:17 GMT, Clive Verghese wrote: > Updated Benchmarks in Throughput mode Thank you very much for the update. > I am currently looking into the JFR profiles to identify why there is a > difference in benchmarks with regards the different cipher suits in the > current ver

Re: RFR: 8270317: Large Allocation in CipherSuite [v2]

2021-07-21 Thread Clive Verghese
On Thu, 15 Jul 2021 17:51:58 GMT, Clive Verghese wrote: >> Right. But calling `containsKey` and then `get` results in two hash map >> lookups. If we cache the result of `get`, we only need one lookup, which >> should be a tiny bit faster. See https://stackoverflow.com/q/14601016 > > I feel that

Re: RFR: 8270317: Large Allocation in CipherSuite [v2]

2021-07-21 Thread Clive Verghese
On Fri, 16 Jul 2021 04:29:51 GMT, Michael Bien wrote: >> src/java.base/share/classes/sun/security/ssl/CipherSuite.java line 865: >> >>> 863: maps_name.put(cs.name, cs); >>> 864: for (String alias : cs.aliases) { >>> 865: maps_name.put(alias, cs); >> >> A

Re: RFR: 8270317: Large Allocation in CipherSuite

2021-07-21 Thread Clive Verghese
On Wed, 14 Jul 2021 17:06:02 GMT, Clive Verghese wrote: > ### Benchmark results > > I have benchmarked 3 cases. > > 1. The current situation. > > Benchmark > (cipherSuite) Mode CntScore Error Units > CipherSuiteBench.benchmarkC

Re: RFR: 8270317: Large Allocation in CipherSuite [v2]

2021-07-21 Thread Clive Verghese
> ### Benchmark results > > I have benchmarked 3 cases. > > 1. The current situation. > > Benchmark > (cipherSuite) Mode CntScore Error Units > CipherSuiteBench.benchmarkCipherSuite > TLS_AES_256_GCM_SHA384 av

Re: RFR: 8270317: Large Allocation in CipherSuite

2021-07-15 Thread Michael Bien
On Wed, 14 Jul 2021 21:18:23 GMT, Xin Liu wrote: >> ### Benchmark results >> >> I have benchmarked 3 cases. >> >> 1. The current situation. >> >> Benchmark >> (cipherSuite) Mode CntScore Error Units >> CipherSuiteBench.benchmar

Re: RFR: 8270317: Large Allocation in CipherSuite

2021-07-15 Thread Clive Verghese
On Thu, 15 Jul 2021 17:51:36 GMT, djelinski wrote: >> That's what containsKey() does, returning false of the value is null. > > Right. But calling `containsKey` and then `get` results in two hash map > lookups. If we cache the result of `get`, we only need one lookup, which > should be a tiny

Re: RFR: 8270317: Large Allocation in CipherSuite

2021-07-15 Thread djelinski
On Thu, 15 Jul 2021 16:39:14 GMT, Anthony Scarpino wrote: >> src/java.base/share/classes/sun/security/ssl/CipherSuite.java line 916: >> >>> 914: static String nameOf(int id) { >>> 915: if (maps_id.containsKey(id)) { >>> 916: return maps_id.get(id).name; >> >> Would it m

Re: RFR: 8270317: Large Allocation in CipherSuite

2021-07-15 Thread Clive Verghese
On Wed, 14 Jul 2021 19:30:23 GMT, Xue-Lei Andrew Fan wrote: > Hi Clive Verghese, > > The performance improve is impressive to me. Would you mind have an > additional benchmark for the throughput (@BenchmarkMode(Mode.Throughput))? I > guess the throughput should be good as well. > > Thanks! S

Re: RFR: 8270317: Large Allocation in CipherSuite

2021-07-15 Thread Anthony Scarpino
On Wed, 14 Jul 2021 20:21:58 GMT, djelinski wrote: >> ### Benchmark results >> >> I have benchmarked 3 cases. >> >> 1. The current situation. >> >> Benchmark >> (cipherSuite) Mode CntScore Error Units >> CipherSuiteBench.bench

Re: RFR: 8270317: Large Allocation in CipherSuite

2021-07-14 Thread Xin Liu
On Wed, 14 Jul 2021 17:06:02 GMT, Clive Verghese wrote: > ### Benchmark results > > I have benchmarked 3 cases. > > 1. The current situation. > > Benchmark > (cipherSuite) Mode CntScore Error Units > CipherSuiteBench.benchmarkC

Re: RFR: 8270317: Large Allocation in CipherSuite

2021-07-14 Thread djelinski
On Wed, 14 Jul 2021 17:06:02 GMT, Clive Verghese wrote: > ### Benchmark results > > I have benchmarked 3 cases. > > 1. The current situation. > > Benchmark > (cipherSuite) Mode CntScore Error Units > CipherSuiteBench.benchmarkC

Re: RFR: 8270317: Large Allocation in CipherSuite

2021-07-14 Thread Xue-Lei Andrew Fan
On Wed, 14 Jul 2021 17:06:02 GMT, Clive Verghese wrote: > ### Benchmark results > > I have benchmarked 3 cases. > > 1. The current situation. > > Benchmark > (cipherSuite) Mode CntScore Error Units > CipherSuiteBench.benchmarkC

RFR: 8270317: Large Allocation in CipherSuite

2021-07-14 Thread Clive Verghese
### Benchmark results I have benchmarked 3 cases. 1. The current situation. Benchmark(cipherSuite) Mode CntScore Error Units CipherSuiteBench.benchmarkCipherSuite TLS_AES_256_GCM_SHA384 avgt 25 124.783 ? 2