Tuning Java Virtual Machines (JVMs) refers largely to memory heap size and garbage collection (GC) tuning.
Memory Heap Size
With most JVMs, tuning heap size requires profiling how the application is using memory, changing parameters and re-profiling. As much as possible, the application needs to be running close to production loads. This is particularly difficult to do, since some real-world loads just won’t be seen in the lab. Most JVMs give you the ability to set initial heap size (-Xms) and maximum heap size (-Xmx), though some also allow other parameters such as large pages. If the heap size is set too large, garbage collection pauses become too long; if heap size is set too small, the application will throw an out-of-memory error and likely crash. Thus memory and GC tuning are closely related topics that impact application performance.
Zing® eliminates the need for most JVM tuning. Zing supports a ‘banking system’ for heap memory that allows runtime instances to reliably grow and shrink the memory heap as needed. Zing can shift physical resources between instances at multiple GB/sec. Not having to get memory heap tuning ‘exactly right’ saves a lot of time. In addition, the platform includes Zing Vision, a zero-overhead, always-on monitoring, tuning and visibility tool. With Zing Vision, you can launch the application quickly for faster time to market and tune in production as you go. Below are examples of actual JVM tuning parameters for a conventional JVM and for Zing.
For more on this topic: