-XX:SurvivorRatio=<size>, where size – is a number used in proportion between eden and survivor space 1:size, meaning each survivor space will be 1/size of the size of eden.
Set survivorRatio to 5:
We can use the option -XX:SurvivorRatio to tune the size of the survivor spaces, but often this isn't important for performance. If survivor spaces are too small, then the copying collection overflows directly into the old generation. If survivor spaces are too large, then they are uselessly empty. At each garbage collection, the virtual machine chooses a threshold number, which is the number of times an object can be copied before it isold. This threshold is chosen to keep the survivors half full.
Default value for -XX: SurvivorRatio is dependent on JVM, for instance default option for the 64-bit Solaris operating system (SPARC Platform Edition) is 8.
TODO link MinHeapFreeRatio, MaxHeapFreeRatio, Xmx, Xms
If you have additional comments, interesting experiences or even point of disagreement with this JVM argument description, please leave a comment. Your insights will help the entire 10+ million java developer community to develop one standard source of documentation for all the JVM arguments.
Edit your Comment