Tuning the JVM
The JVM is used in a number of places � the Benchmark Driver, the SPECjAppServer2002 Application and the SPECjAppServer2002 Emulator � so ensuring the JVM is running smoothly is very important. The options discussed here can be used at all levels, but relate specifically to the SPECjAppServer2002 Application.
There are some initial guidelines for running a JVM that should be followed:
1. Try to use the latest JVM from Sun, if possible. Sun are constantly improving on performance from release to release. This document assumes that Sun�s SDK 1.4.2_05 is being used.
2. Make sure the following option is present, as the first JVM option:
This will run the HotSpot Server JVM and is best suited for longer running applications. This option will typically hurt performance on the Benchmark Driver, so do not apply the option there.
3. Tuning the total heap size allocated to a JVM is very important. It�s equally important to tune the sizes of each generation. See http://java.sun.com/docs/hotspot for links related to tuning the heap. Sun recommends setting the Young Generation size to a third of the total heap size. For example, if a total heap size were 100Mb, the young generation size should be ~33Mb:
-XX:NewSize=33m �XX:MaxNewSize=33m �Xms100m �Xmx100m
4. The following JVM option may help performance:
5. The following JVM properties may help performance:
The properties defer Sun�s Distributed Garbage Collection (DGC) mechanism and allow the JVM to manage the heap as specified by the user. Without the properties, the JVM will force a Full Garbage Collection every 60 seconds.