NonStop Server for Java 7.0 Programmer's Reference
on the Internet. GC tuning is assisted by GC profile data which can be collected and analyzed as
explained in the subsequent sections.
Since GC occurs when generations fill up, the amount of available total heap memory has direct
impact on the performance. The parameters that affect the heap are as follows:
-Xms: The startup size of memory allocation pool (the Java heap)
-Xmx: The maximum memory allocation pool
The maximum value for Nonstop system depends on the location of QIO segment
when using 32–bit NSJ7. If the segment is moved to KSEG2, the maximum value
can be as high as 1276 MB, otherwise, the value might stay around 350 MB. For
information on QIO segment location, see “Memory considerations: Moving QIO
to KSEG2” (page 26). Also, see “Java heap size with 32–bit JDK7” (page 57).
When using 64–bit NSJ7, the theoretical maximum value is 484 GB. However, the
actual limit is constrained by the size of physical memory and swap space available
from the Kernel-managed swap space, and the number of processes contending
for these resources.
For more information, see “Java heap size with 64–bit JDK7” (page 57).
For larger server applications, the default values of the two options listed are usually inadequate.
In general, you must assign as much memory to the JVM.
Another important factor that affects performance is the proportion of the heap that is assigned to
the young generation. The parameters for the young generation heap are as follows:
-XX:NewRatio=nn
The ratio between the young and old.
-XX:NewSize=nn
The lower size bound.
-XX:MaxNewSize=nn
The upper size bound.
-XX:SurvivorRatio=nn
Tune the survivor spaces (illustrated in the Figure 2 (page 52)).
For example,
java -Xms512m -Xmx512m -XX:NewSize=256m -XX:MaxNewSize=256m \
-XX:SurvivorRatio=2 <class>
These options notify the JVM to set:
• The initial size of the heap to 512 MB.
• The maximum heap size to 512 MB.
• The new generation to 256 MB (128 MB belongs to Eden and 2x64 MB survivor).
• The old generation to 256 MB.
For more information about all these parameters, see Java HotSpot VM Options.
For more information about tuning garbage collection with the Java SE 7 HotSpot virtual machine,
and for general performance tuning information, see the following documentation:
• Java SE 7 HotSpot Virtual Machine Garbage Collection Tuning.
• The article Tuning Java I/O Performance.
58 Implementation specifics










