JEP 522 performance regression with large pages

Stefan Johansson stefan.johansson at oracle.com
Mon Sep 1 09:51:05 UTC 2025


Hi Brian,

As Thomas mentioned you uncovered a problem with THP in JDK 25.

I guess the reason that you don't see the regression in your baseline is 
because you compare JEP 522 against JDK 24 (which is not affected by the 
regression), is that correct?

The workaround for using THP with G1 in JDK 25 is to configure the THP 
mode to 'always' instead of 'madvise'.

Hope this helps,
Stefan

On 2025-09-01 11:26, Thomas Schatzl wrote:
> Hi Brian,
>
> On 28.08.25 23:49, Brian S O'Neill wrote:
>> Okay...
>>
>> sysctl -w vm.nr_hugepages=2048
>>
>> java -XX:+UseG1GC --enable-native-access=ALL-UNNAMED --add-exports 
>> java.base/jdk.internal.misc=ALL-UNNAMED --enable-native-access=ALL- 
>> UNNAMED --add-opens java.base/jdk.internal.misc=ALL-UNNAMED -Xms3g - 
>> Xmx3g -XX:+UseLargePages -XX:-UseTransparentHugePages <main class>
>>
>> G1GC:         234.7 seconds
>> G1GC JEP 522: 230.7 seconds
>>
>> So, it seems that regression is with THP.
>
>   given your report about THP issues, a colleague looked into the THP 
> code, and it seems that THP is somewhat broken for JDK 25.
>
> This is currently under investigation in 
> https://bugs.openjdk.org/browse/JDK-8366434.
>
> Not sure if it helps here, because in both baseline and changed code 
> the error is probably present.
>
> Hth,
>   Thomas
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/hotspot-gc-dev/attachments/20250901/fe92b107/attachment-0001.htm>


More information about the hotspot-gc-dev mailing list