The following are the JVM parameters/flags commonly used in applications to tune the JVM for better performance. Tuning values depend on our application's behavior and the rate at which it is generated. So there is no defined guideline to use specific values for JVM flags in order to achieve better performance.
JVM flags
-Xms and -Xmx
The -Xms and -Xmx are known as the minimum and maximum heap size. Setting -Xms equal to -Xmx prevents GC pauses during heap expansion and improves performance.
-XX:NewSize and -XX:MaxNewSize
We can set the size of the Young Generation...