|
Problem |
WebSphere® Application Server or Administrative Server JVM
fails to start with a genconfig error: Total min generation size greater
than min size.
There can be a problem using the -Xgenconfig parameter to tune the garbage
collection of the JVM on Solaris and HP-UX so that it will work properly
and avoid the error message:
genconfig error: Total min generation size greater than min size
parameter in option :256m,256m,semispaces:512m,512m,markcompact. |
|
Cause |
The JVM checks that the parameters from the genconfig
parameter make sense. If they do not, then the JVM aborts. The setting of:
-Xms512m -Xmx1024m
-Xgenconfig:256m,256m,semispaces:256m,512m,markcompact
resulted in this error message.
Below is an explanation of this settings.
-Xgenconfig:256m,256m,semispaces:256m,512m,markcompact
256m,256m,semispaces means a young generation consisting of a
semispaces collector with an initial semi-space size of 256 m and a
maximum semi-space size of 256 m.
For 1.3, the similar setting would be:
-XX:NewSize=256m -XX:MaxNewSize=256m
256m,512m,markcompact means a mark-compact old generation with
initial 256 mb size and max 512 mb size; the old generation space starts
out at 256 m and can grow to 512 m.
In 1.3 and 1.4, the old generation is sized as the remaining heap size not
occupied by the young generation; the equivalent setting for JDK™ 1.3.1 is
-XX:NewSize=256m -XX:MaxNewSize=256m -Xms512m -Xmx1024m
|
|
Solution |
The key to understanding how these parameters are used is
to understand that the Sun Solaris Operating System and HP JDK divides the
heap into two spaces or sections; these are called the young generation
space and the permanent space. The size of these two spaces has default
values that can be overridden; the parameters that are used to override
these settings are different for the JDK 1.2.2 JVM and JDK 1.3.x JVM.
- JDK 1.2.2 uses the genconfig parameter to set the size of
the young generation and permanent spaces. The initial size of the young
generation space is the first number after the -Xgenconfig:
parameter. The second number is the maximum size of the young generation
space. The numbers after the parameter semispaces are the initial size of
the permanent space and the maximum size of the permanent space.
- JDK 1.3.1 uses the -XXNewSize and -XXMaxNewSize to control
the size of the young generation space and uses -XXMaxPermSize to set the
size of the permanent space.
The -Xms and -Xmx flags are the initial heap size and maximum heap size
respectively. The -Xgenconfig flag must be consistent with these
parameters. If they are not, rather than override parameters supplied, the
JVM aborts with an error message indicating what was done wrong. The
genconfig parameter allows you to specify the size of the young and old
generation heap space. The heap in the Solaris and HP-UX JDK is divided
into two sections; the young generation space and the old generation
space.
- Total heap size = young generation space + old generation
space.
- -Xms must be greater than or equal to the first genconfig
parameter, plus the first semispaces parameter.
- --Xmx must be greater than or equal to the second
genconfig parameter plus the second semispaces parameter.
We do not recommend that you set -Xms and -Xmx in conjunction with
-Xgenconfig, because these are two different ways of specifying the same
thing. If you set both, the possibility for inconsistency increases.
Below is an interpretation of:
-Xgenconfig:128m,256m,semispaces:256m,512m,markcompact
- The first genconfig parameter is the initial semi-space
size. This is the initial size of the young generation section of the
heap, which is 128 m. The second genconfig parameter is the maximum size
of the semi-space, which is also 256 m.
- The semispaces parameters control the size of the old
generation heap space. The first parameter is the initial size of the old
generation heap space, which is 256 m. The second parameter is the maximum
size of the old generation heap space, which is 512 m.
- Based on these settings:
- The -Xms must be at least 384 m; if -Xms is not set at all, it defaults
to 384 m, which is 128 m (the first genconfig parameter) plus 256 m (the
first semispaces).
- The -Xmx, if it is specified, must be at least 768 m, which is
determined by the sum of the second genconfig parameter (256 m) plus the
second semispaces parameter (512 m). If the -Xmx is not set at all, it
defaults to 768 m.
- If, however, you want to specify both, you must remember
that when using the general form
-Xms<A> -Xmx<B>
-Xgenconfig:<C>,<D>,semispaces;<E>,<F>
Make sure that -Xms>=C+E and -Xmx>=D+F.
|
|
|
|
|
|
|