Java Reference
In-Depth Information
Table A-3. Flags common to all GC algorithms
Flag
What it
does
When to use it
See also
Sets the
initial size
of the heap.
When the default initial size is too small for your
application.
Sizing the
Heap
-Xms
Sets the
maximum
size of the
heap.
When the default maximum size is too small (or
possibly too large) for your application.
Sizing the
Heap
-Xmx
Sets the ra-
tio of the
young gen-
eration to
the old
generation.
Increase this to reduce the proportion of the heap
given to the young generation; lower it to increase
the proportion of the heap given to the young
generation. This is only an initial setting; the pro-
portion will change unless adaptive sizing is
turned off (except for CMS, when the young-gen-
eration size is constant). As the young-generation
size is reduced, you will see more frequent young
GCs and less frequent full GCs (and vice versa).
Sizing the
Generations
-XX:NewRatio
Sets the
initial size
of the
young gen-
eration.
When you have finely tuned your application re-
quirements.
Sizing the
Generations
-XX:NewSize
Sets the
maximum
size of the
young gen-
eration.
When you have finely tuned your application re-
quirements.
Sizing the
Generations
-XX:MaxNewSize
Sets the
initial and
maximum
size of the
young gen-
eration.
When you have finely tuned your application re-
quirements.
Sizing the
Generations
-Xmn
Search WWH ::




Custom Search