What is the difference between xmx and MaxRAM JVM parameters?

-Xmx specifies the precise upper limit for the heap. It is the preferred way to set the heap size.

-XX:MaxRAM does not define the heap size directly. Instead this parameter overrides the actual amount of physical RAM when calculating the heap limits basing on ergonomics.

If -Xmx is set, MaxRAM is never used. Otherwise the maximum heap size is estimated1 as

MaxHeapSize = MaxRAM * MaxRAMPercentage / 100% (default MaxRAMPercentage=25)

1 The actual algorithm is a bit more complicated and depends on other parameters.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)