Performance differences between Java 8,, 11, 14 and 16
Xuelei Fan
xuelei.fan at oracle.com
Wed May 12 05:42:04 UTC 2021
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.firmstone at 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.
>
More information about the security-dev
mailing list