你好先生范, 不客气,

https://github.com/pfirmstone/JGDMS/blob/trunk/qa/src/org/apache/river/test/impl/mahalo/RandomStressTest.java

https://github.com/pfirmstone/JGDMS/blob/trunk/qa/src/org/apache/river/test/impl/mahalo/RandomStressTest.td

With the follow property set to reproduce:

org.apache.river.test.impl.mahalo.RandomStressTest.seed=1620791630932

谢谢

--
Regards,
Peter Firmstone
Zeus Project Services Pty Ltd.


On 12/05/2021 3:42 pm, Xuelei Fan wrote:
Hi Peter,

For further understanding, may I know more details about the test code?

Thanks,
Xuelei

On May 11, 2021, at 10:31 PM, Peter Firmstone <peter.firmst...@zeus.net.au> 
wrote:

Just ran some performance stress tests to compare performance between Java 8 
and Java 14 with SecurityManager enabled and using TLSv1.3 secure 
communications.

On Java 8, AccessController.getStackAccessControlContext[native]() is 7,741ms 
of process CPU consumption.

On Java 11, AccessController.getStackAccessControlContext[native]() is 7,769ms 
of process CPU consumption.

On Java 14, AccessController.getStackAccessControlContext[native]() is 133,815 
ms of process CPU consumption.

On Java 16, AccessController.getStackAccessControlContext[native]() is 5,144 ms 
of process CPU consumption.

I wasn't expecting such a huge difference in performance.

Total time for the test on Java 8 is 97 seconds.

Total time for the test on Java 11 is 1 minute 37 seconds (same as Java 8)

Total time for the test on Java 14 is 2 minutes and 1 second.

Total time for the test on Java 16 is 1 minute and 36 seconds.

Both tests are using TLSv1.3 secure communications.

It would seem that Java 16, 8 and 11 are the performance winners in this case, 
where the above method is less than 0.5% of CPU. Java 14 is around 15% of CPU.

Not sure why Java 14 is performing poorly in comparison to other versions, the 
results are pretty consistent to the second.

--
Regards,
Peter Firmstone
Zeus Project Services Pty Ltd.

Reply via email to