I have the following problem:
There is a Java VM with Xmx Option set to 70000m = 70GB (Yes, it is that big). But if I monitor the before mentioned JVM, Max Heap is shown as 140000m (as seen in the screenshot).
Following a listing of used JVM options:
-XX:+UseG1GC
-Duser.timezone=Europe/Berlin
-Djava.security.egd=file:///dev/urandom
-Dsun.rmi.transport.tcp.handshakeTimeout=180000
-Dsun.rmi.dgc.client.gcInterval=600000
-Dsun.rmi.dgc.server.gcInterval=600000
-verbose:gc
-XX:CICompilerCount=2
-Xrunjdwp:transport=dt_socket,server=y,address=3997,suspend=n
-Xms70000m
-Xmx70000m
-XX:+UnlockExperimentalVMOptions
-XX:G1HeapRegionSize=32
-XX:MaxGCPauseMillis=200
-XX:G1NewSizePercent=2
-XX:G1MaxNewSizePercent=60
-XX:ParallelGCThreads=8
-XX:ConcGCThreads=2
-XX:InitiatingHeapOccupancyPercent=45
-XX:G1MixedGCLiveThresholdPercent=65
-XX:G1HeapWastePercent=10
-XX:G1OldCSetRegionThresholdPercent=10
-XX:G1ReservePercent=10
Has anybody a hint, why VisualVM shows double max heap size?
Under the Java tab, select JVM Options. Edit the -Xmx256m option. This option sets the JVM heap size. Set the -Xmx256m option to a higher value, such as Xmx1024m.
Opening a Heap Dump File If you have a heap dump file saved on your local system, you can open the file in Java VisualVM by choosing File > Load from the main menu. Java VisualVM can open heap dumps saved in the . hprof file format. When you open a saved heap dump, the heap dump opens as a tab in the main window.
This is a bug in visualVM when using the G1 garbage collector, the max is not actually this large. Jconsole does report it correctly.
The following report provides a possible explanation. The reason here is that the different generations no longer have a fixed size, but instead the max size for each is the size of the full heap (as they can both use as much as needed). I have not been able to find any official bug report for this yet.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With