If you look at the documentation (e.g. http://www.oracle.com/technetwork/java/javase/tech/vmoptions-jsp-140102.html ) you will find a default 8 for XX:SurvivorRatio.
If you check a running jvm which has been startet without explicitly setting a SurvivorRation you can see this default:
jmap -heap <pid>
will output
...
SurvivorRatio = 8
...
But if you check the maximum size for S1 S0 using VisualGC, you can see that a SurvivorRatio = 1 is used instead.
The picture changes if you start the java programm explicitly whith -XX:SurvivorRatio=8
So why the default. A Default which is not used is quite irritating.
There is the BOOK about java performance tuning:
-XX:SurvivorRatio=<n> should be used when you want to explicitly size survivor
spaces to manipulate object aging with the concurrent garbage collector, or to
manipulate object aging with the throughput garbage collector when adaptive sizing
is disabled using the command line option -XX:-UseAdaptiveSizePolicy.
So the -XX:SurvivorRatio is ignored unless you use -XX:-UseAdaptiveSizePolicy.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With