Questions about different default value of NewRatio

Jon Masamitsu Jon.Masamitsu at Sun.COM
Fri May 11 15:26:41 UTC 2007


Neo Jia wrote:

>hi,
>
>I just found that different compiler is using different ratio on JDK7,
>which make sense. But for the same compiler, the default value will be
>changed across different platforms. Is there any implementation
>concern for this?
>
>For example, why using two different value on 64 bit and 32 bit for
>C2? I assume that the NewRatio will only impact the efficiency of the
>minor GC.
>
>   1     31  hotspot/src/cpu/amd64/vm/c2_globals_amd64.hpp <<GLOBAL>>
>             define_pd_global(intx, NewRatio, 2);
>   2     28  hotspot/src/cpu/i486/vm/c1_globals_i486.hpp <<GLOBAL>>
>             define_pd_global(intx, NewRatio, 12 );
>   3     43  hotspot/src/cpu/i486/vm/c2_globals_i486.hpp <<GLOBAL>>
>             define_pd_global(intx, NewRatio, 8);
>   4     29  hotspot/src/cpu/ia64/vm/c2_globals_ia64.hpp <<GLOBAL>>
>             define_pd_global(intx, NewRatio, 2);
>
>Thanks,
>Neo
>  
>
These different NewRatio's reflect several beliefs.

    A) Applications run on a 64 bit machine will use large heaps and are
    applications where throughput is more important.

    B) Applications run on IA32 (i486) are smaller client type applications
    and pause time is more important.

    C) C1 is used more often for smaller client applications.

    D) C2 is used more often for larger server applictions.

Belief A) leads us to use NewRatio of 2 on amd64 and ia64.  Believe B)
leads us to use smaller values on i486.  Beliefs C) and D) lead us to
make the  value for C1 on i486 a bit smaller (12) and for C2
on i486 a bit larger (8).

The biggest difficulty I've had with this is that on 32bit sparc the
NewRatio
is 2 and on 32bit i486 the value is 8 for C2.  I think this reflects the
belief that customers buy sparc platforms to run large applications.
But currently when moving between the two 32bit platforms (sparc and i486)
there is a significant difference in GC behavior because of the different
NewRatio values.








More information about the hotspot-gc-dev mailing list