Java Optimization on RHEL

Cheryl Huntington Cheryl.Huntington at Sun.COM
Thu Apr 1 21:29:27 UTC 2004



Chris Purcell wrote:
>>We're about to set up an active/passive cluster on two RHEL ES 3.0
>>servers.  The servers will host a Java app that is very resource
>>intensive.  The servers are Compaq ProLiant DL380's with dual P4's and
>>4GBs of RAM each.
>>
>>I don't know anything about Java, I just do the system administration
>>here.  Are there any Java performance tuning tweaks that can be done to
>>the servers to improve the performance of the servers?
> 
> 
> 
> Anybody?  If no one knows, is there a better place to ask this question? 
> Maybe on the Sun Java list perhaps?
> 
> Thanks,
> Chris
> 
> 
> 

Here are some general suggestions I was able to track down.

Size the java heap accordingly.  There is a 2GB contiguous memory limit 
on linux, so try sizing the heap at 1.6gb.
For the hotspot JVM the flags are:
java -server -Xms1600m -Xmx1600m

more advanced options are available if GC is a bottleneck.
First, try AggressiveHeap.
-server -Xms1600m -Xmx1600m -XX:+AggressiveHeap

AggressiveHeap turns on ParallelGC, TLABs and sizes  the young 
generation, along with a few other platform and competitive benchmarking 
specific flags.  The important flags to try are:

-Xmn400m (size young gen. to 1/4 overall heap size to start)

-XX:+UseParallelGC

-XX:+UseTLAB

Cheryl





More information about the redhat-list mailing list