Note that there are some explanatory texts on larger screens.

plurals
  1. POAre ratios between spaces/generations in the Java Heap constant?
    primarykey
    data
    text
    <p>I have read <a href="http://www.oracle.com/technetwork/java/javase/gc-tuning-6-140523.html" rel="nofollow noreferrer">this article</a> about virtual machine garbage collection tuning to understand the java garbage collector better. Each space has a <em>Virtual</em> heap space area which it can grow into as the heap space needed gets closer to the max heap size. This can be seen in this picture: <a href="http://www.oracle.com/ocom/groups/public/@otn/documents/digitalasset/190244.gif" rel="nofollow noreferrer">Java GC arrangement of generations http://www.oracle.com/ocom/groups/public/@otn/documents/digitalasset/190244.gif</a></p> <p>You can set the ratio between <em>Young Generation</em> and <em>Old (Tenured) Generation</em> with the <strong>NewRatio</strong> parameter, and the ratio between <em>Eden Space</em> and <em>Survivor Space</em> with the <strong>SurvivorRatio</strong> parameter.</p> <p>Recently <a href="https://stackoverflow.com/questions/15413783/standard-allocation-ratio-for-java-heap">this question</a> was asked about finding out the default ratios for the heap spaces. It says you should use the <strong>PrintGCDetails</strong> parameter and calculate the ratios manually.</p> <p>My question is: Does the size of the different heap spaces increase by the same ratio, thus keeping the ratio set between them at startup constant during the whole runtime of the application? For example, if Young Generation and Old/Tenured Generation has a default NewRatio of 3, and the initial reserved heap space is 100MB for Young, and 300MB for Old. If more memory needs to be reserved for the Old Space, lets say 300MB more making it 600MB total. Does memory reserved for Young Space also double to 200MB keeping the ratio intact? </p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload