JDK-8231460: Java update from 11.0.11 to 11.0.13 changes JVM code cache behavior and results in more process cpu usage and unexpected profiled nmethods memory usage

Tobias Hartmann tobias.hartmann at oracle.com
Tue Dec 14 13:30:54 UTC 2021


Hi Josef,

Thanks for reporting this issue!

Any chance you could run your application with different builds to narrow the problem down to a
single change?

@Lutz: As the author of 8223444 and 8231460, any ideas?

Best regards,
Tobias


On 01.12.21 16:35, Josef Lehner wrote:
> Dear OpenJDK team,
> 
> as described in this StackOverflow question, I want to reach out to you and
> question whether the JVM code cache / codeheap still works as designed.
> https://stackoverflow.com/questions/70086548/java-update-from-11-0-11-to-11-0-13-changes-jvm-code-cache-behavior-and-results
> 
> What we experience in our huge application is that with Java 11.0.13 and
> -XX:ReservedCodeCacheSize=375m the code cache / codeheap 'profiled
> nmethods' (C1 optimized, ~ 180 MB) drops after a very short time to a very
> low level (less than 50 MB) and stays at this level forever while
> 'non-profiled nmethods' (C2 optimized) is already at its limits.
> After we tripled the -XX:ReservedCodeCacheSize to 1024 MB, both areas
> 'profiled nmethods' and 'non-profiled nmethods' have stayed at a much
> higher constant level (~ 258 MB) for over a week now instead of dropping to
> less than 50 MB after 15 min (-XX:ReservedCodeCacheSize=375m) or dropping
> after 3 hours (-XX:ReservedCodeCacheSize=512m).
> From my point of view as a non-expert I would expect that the C1 optimized
> code does not get removed (or at least not so much) from 'profiled
> nmethods' as there is no space left in 'non-profiled nmethods' to optimize
> it further. What do you think?
> 
> Important changes in 11.0.12:
> https://bugs.openjdk.java.net/browse/JDK-8223444 Improve CodeHeap Free
> Space Management
> https://bugs.openjdk.java.net/browse/JDK-8231460 Performance issue
> (CodeHeap) with large free blocks
> 
> Best regards
> Josef Lehner
> 


More information about the hotspot-compiler-dev mailing list