Understanding TargetSurvivorRatio
Holger Hoffstätte
holger.hoffstaette at googlemail.com
Tue Sep 24 03:35:04 PDT 2013
On 09/23/13 15:15, Denny Kettwig wrote:
> Currently I try to understand the TargetSurvivorRatio parameter in
> detail and after several days of research and tests I came to no
> conclusion. So I try to share my thoughts with you.
There's a decent human-readable explanation on:
http://www.techpaste.com/2012/02/java-command-line-options-jvm-performance-improvement/
> With the results I got out of my tests I got even more confused than before.
Welcome to CMS Fight Club. :-)
Whether testing extreme values (1 or 99) yields useful results is
anybody's guess (probably not), but essentially a higher-than default
(50%) TSR should prevent more objects from tenuring prematurely, at the
cost of increased risk of "bumping your head" when an allocation spike
happens and the survivor spaces are full.
For smaller heaps (<=8G) IMHO simply decreasing the SurvivorRatio (from
its default 8 down to e.g. 4 or 6) is less fragile, since it should be
mostly independent of any "guessed" allocation rate and scales with the
rest of the system/application, even if somewhat disproportionally.
The effect should be roughly the same. The costs may not be.
-h
More information about the hotspot-gc-use
mailing list