Closed tschurins closed 2 years ago
Not sure it's worth the effort to try them, but FYI JVMs from adoptopenjdk.net pre-dated Semeru builds. You can find releases for Java 12- 16 there. https://adoptopenjdk.net/archive.html?variant=openjdk16&jvmVariant=openj9
Besides the tracking used to create the summary in the javacore, OpenJ9 tracks it's non-virtual memory allocations. There are two possibilities to help track it down.
1) Run with the following JVM options, which prints a summary of the memory allocations from each code location every 99999'th time memory is allocated. The number can be adjusted depending on how much output occurs. Compare between jdk11 and jdk17 to identify the extra allocations.
-Xcheck:memory:quick,noscan,callsite=99999
2) Create a system core file similarly to how the javacore files were created. Open the system core using jdmpview -core <core>
and run !findallcallsites
to print a summary of memory allocations done from each location in the code, from biggest to smallest.
Here is the result of using jdmpview on the java 17 run:
> !findallcallsites
total alloc | largest
blocks | bytes | bytes | callsite
-------+-------+-------+-------+-------+-------+-------+-------+-------+-------
318378 1411047472 4432 ../../../../../openj9/runtime/vm/extendedMessageNPE.cpp:608
318378 1411047472 4432 ../../../../../openj9/runtime/vm/extendedMessageNPE.cpp:609
318378 1352466064 4248 ../../../../../openj9/runtime/vm/extendedMessageNPE.cpp:619
4912 224301400 2097240 ../../../../../openj9/runtime/vm/segment.c:253
318378 94239800 296 ../../../../../openj9/runtime/vm/extendedMessageNPE.cpp:604
6725 83964824 621616 ../../../../../openj9/runtime/vm/segment.c:248
318378 81504640 256 ../../../../../openj9/runtime/vm/extendedMessageNPE.cpp:637
5 19652560 3930512 ../../../../../../omr/gc/base/WorkPackets.cpp:179
1425 6210760 601280 ../../../../../openj9/runtime/gc_base/StringTable.cpp:86
Comparing with the java 11 run:
> !findallcallsites
total alloc | largest
blocks | bytes | bytes | callsite
-------+-------+-------+-------+-------+-------+-------+-------+-------+-------
4997 210848488 2097240 ../../../../../openj9/runtime/vm/segment.c:253
7115 83933648 621616 ../../../../../openj9/runtime/vm/segment.c:248
5 19652560 3930512 ../../../../../omr/gc/base/WorkPackets.cpp:179
1427 6216216 601280 ../../../../../openj9/runtime/gc_base/StringTable.cpp:86
We clearly see that this extendedMessageNPE.cpp is the culprit. The numbers also matches, number of allocations and total memory are roughly the same as the JRE>VM>Other memory.
This is being fixed via https://github.com/eclipse-openj9/openj9/pull/15550
Thanks for the quick fix! We will test again when available.
Hello, We have tested with version 17.0.4+8 and everything is fine - memory consumption is same as for java 8 and java 11. Thanks!
We are migrating our application from java 8 to java 17. Our application runs in OpenLiberty. Our target is to use the official OpenLiberty docker image (open-liberty:22.0.0.3-full-java17-openj9) which comes with IBM Semeru JDK and OpenJ9. When running our application with this image, we detected an abnormal usage of memory (around 8Gb instead of 4Gb).
We did some investigations: in that image, we loaded a different jdk to see the impact:
We couldn't find older IBM semeru JDK (12, 13, 14, 15) to see from when the problem is present.
We took heap dumps and compare them, but there was no real difference. We took java dumps to see how the memory was used. Comparing java 8 and java 17, the main difference between the two is the JRE>VM>Other part of the memory (which is around 2Mb with java 8, but takes 4Gb with java 17):
Java 8 memory:
Java 17 memory:
Unfortunately, we were not able to determine what this JRE>VM>Other part of the memory was containing. Here are the java dumps: javacore.zip
Any tips are welcome.