For an application I use JVM Max heap setting when starting it on both a test environment and a production system. When i connect via JMX to monitor the application I see that the max heap size of production app is not the same as test application. I use -Xmx2000m on both and on test environment I get 1,864,171,520 B and on production I get 2,009,726,976 B.
So my questions are -Is this info reliable. The Java versions and the machines are identical (Mac OS X 10.5).
-If this info is reliable then what could be causing this and how can it be changed so both systems behave the same for max heap size setting.
The JVM will not automatically allocated the -Xmx amount of memory, so very minor environmental differences could cause the two virtual machines to end up with different process sizes (and for 2 GB, 139 MB is and arguably small difference, no ?)
See this post on JVM Memory Usage.