» Back to table of contents

OS version

If you're using many threads in your benchmark, your benchmark will probably run better on HP-UX 11.0 than on 10.20.

You will need to adjust the tunable kernel parameters to accommodate the number of threads in the benchmark.

first step

Run the benchmark with -verbosegc. Analyze the output looking at the amount of space actually used by the application and the frequency of the garbage collections.

tuning the JVM

Use a command line similar to: java -ms<GCHeapSize> -mx<GCHeapSize> -alljit -moncache=16x256 -montlscache=16 -allocCacheSize=4k <class>

where GCHeapSize is the size of the heap determined to result in the maximum throughput for the machine on which the benchmark is running. The size of the heap is dependent on the amount of memory on the machine. A heap larger than the real memory size will force the machine to swap pages during garbage collection. A heap too small will cause garbage collections and compactions that are too frequent.

Additionally, using -noclassgc (not collecting classes), can reduce garbage collection time. Using -verbosegc can help you determine the tradeoff between the amount of space reclaimed by collecting classes versus the amount of time required to do the garbage collection. Often, we see the same class collected at each garbage collection, which uses up space and time.

tuning the JVM process

On some benchmarks, using chatr for large pages will increase throughput:

cd /opt/java/bin/java/PA_RISC/native_threads
chmod +w java
chatr +pa 64M +pi 64M java
chmod 555 java

cd /opt/java/lib/java/PA_RISC/native_threads
chmod +w libjava.sl libnet.sl
(+any others used)
chatr +pa 64M +pi 64M libjava.sl
chatr +pa 64M +pi 64M libnet.sl
chmod 555 libjava.sl libnet.sl
(+any others used)


For some applications using a large negative renice of client and server will boost performance:

renice -n -20 <pid>

for the BEA WebLogic benchmark

For 50,000 users, our BEA WebLogic expert has found that the following is best for a large server (N-class):

ndd -set /dev/tcp tcp_conn_request_max 1024
java -ms768m -mx768m -moncache=16x128 -montlscache=16 -allocCacheSize=4k
-Dweblogic.system.gc.enabled=false <class>


The -Dweblogic.system.gc.enabled=false turns off the WebLogic initiated GC. HP's JVM is better at scheduling garbage collections when space is required rather than trying to have calls in the application that do the garbage collection.

Other benchmarks will probably also benefit from turning off program-generated garbage collections that occur when the benchmark is running.

» Please let us know additional information you'd like to see in the programmer's guide.

Java™ and all Java-based trademarks and logos are trademarks or registered trademarks of Sun Microsystems, Inc.. in the U.S. and other countries. Hewlett-Packard is independent of Sun Microsystems, Inc.