Jon Masamitsu's Weblog

  • Java
    March 5, 2007

GC Errata 1

Guest Author
Just some tid bits of information to fill some of the holes in the

GC ergonomics is used by default on server class machines. Please see


for a description of GC ergonomics and server class machine. The flag "-server" causes the
server VM to be used. "-server" does not cause
the platform on which the VM is running to be considered a
server class machine.

Prior to JDK6 the UseParallelGC collector (with GC ergonomics turned on) used
only the flags InitialSurvivorRatio and
MinSurvivorRatio to set the initial survivor ratio and the minimum survivor
ratio, respectively. GC ergonomics dynamically resizes the survivor spaces,
but these flags allow the user to specify initial and minimum sizes for
the survivor spaces. The flag SurvivorRatio is used by the other collectors
(that don't dynamically resize the survivor spaces) to set the size of the
survivor spaces. SurvivorRatio was ignored by the UseParallelGC collector.
Beginning with JDK6 if the SurvivorRatio is set on the command line for
the UseParallelGC collector and InitialSurvivorRatio and MinSurvivorRatio
are not explicitly set on the command line,
then InitialSurvivorRatio and MinSurvivorRatio are
set to SurvivorRatio + 2.

If UseAdaptiveSizePolicy is turned off when using
the UseParallelGC collector,
the tenured generation and the young generation stay at their initial sizes
throughout the execution of the VM.

Starting with JDK5 update 06 the maximum tenuring threshold is limited to 15. The
GC logging output does not correctly reflect this change. This is a bug that
will be fixed under 6521376.

If a minimum heap size is set
with -Xms and NewSize is
not explicitly set, the minimum young generation size is
calculated using NewRatio. The UseParallelGC collector
is not correctly using the minimum value calculated from
-Xms and NewRatio but is using the default value of NewSize.
Explicitly setting NewSize does correctly set the minimum
size for the generation. This is being fixed under bug 6524727.

Join the discussion

Comments ( 3 )
  • Damon Hart-Davis Monday, March 5, 2007
    Are you saying that specifying -server does not switch SoftReference expiry to the server-style behaviour, ie based on max memory not current total memory? If so, it's a bad bug! Although in the end I'd like GC to work out at run time what the best style of expiry is, to make it one less reason to have poor 'out of the box' performance... (Are you listening Mr Dagastine? :)



    PS. Who ate the tenuring bit?

  • Jon Usmatsami Thursday, March 8, 2007

    -server still uses the server-style SoftReference policy. There has actually not been any change in the meaning of -server. But I heard from a newer user who had thought that -server meant that all the server-class machine defaults would be used. It seemed a misunderstanding that could be common so I wanted to make it clear that -server does not imply the platform is then considered a server-class machine. -server means what it always has.

  • Jon Usmtasami Thursday, March 8, 2007
    The biased locking implementation (flag is UseBiasedLocking) used one of the age tenuring bits.
Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.