You need to look at the JVM memory parameters. in fact, you can install as much memory as you want for your JVM:
-Xmx2048m -> this param to set the max memory that the JVM can allocate
-Xms1024m -> the init memory that JVM will allocate on the start up
-XX:MaxPermSize=512M -> this for the max Permanent Generation memory
therefore, in your case, you can install a large memory, like on another machine. therefore, you will not receive more RAM than the Xmx value
and you can also check these parameters.
-XX:MaxNewSize= -> this need to be 40% from your Xmx value
-XX:NewSize=614m -> this need to be 40% from your Xmx value
you can also tell the JVM which type of GC to use as:
-XX:+UseConcMarkSweepGC
SO, if you set these parameters on both machines, you will get the same results and the same GC activity.
source
share