Survivor Ratio - Heap Tuning Settings

Heap tuning is  very important and interesting concept. There are several levels and many parameters part of this exercise.Now we are going to discuss about survivor ratio.

Survivor Ratio specifies how large Eden should be sized relative to one of the two survivor spaces.if the survivor ratio is 6 then Eden space 6 times greater than the survivor space which is 1:6.
Allocating enough amount of memory in survivor spaces is very important for good performance.If survivor spaces are too small,when GC happens it may overflows directly into the old generation.If survivor spaces is too large we wasting lot memory.

Setting up the SurvivorRatio can be done through the JVM argument -XX:SurvivorRatio=6. For Example we have 2048 MB of young generation memory as per the above survivor ratio it will divided as follows

Total Memory=2048
Total Segments=8(2 survivors + 6 times of Eden as per survivor ratio)
Memory per segment=256 (2048/8)
Survivour 1= 256 MB
Survivour 2= 256 MB
Eden= 1536 MB


Post a Comment

Powered by Blogger.