javaheap-memoryjava-heap

JVM committed heap memory is more than Xmx


I have these jvm param set

-Xms24g -Xmx24g -XX:+UseG1GC -XX:+AggressiveOpts -XX:+UnlockCommercialFeatures -XX:+UnlockExperimentalVMOptions -XX:InitiatingHeapOccupancyPercent=17 -XX:G1MaxNewSizePercent=75 -XX:+FlightRecorder -XX:+PrintCommandLineFlags 

But In my heap statistics it shows heap stats. How can committed be more than Xmx?


Solution

  • in jconsole it shows values in GB

    GB to GiB
    
    Multiply by (1000³ / 1024³), equivalent to 0.931323
    
    Divide by this value to go from GiB to GB
    

    25.8*0.931323 = 24.0281334