Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Java Optimization on Linux

Status
Not open for further replies.

nix45

MIS
Joined
Nov 21, 2002
Messages
478
Location
US
We're about to set up an active/passive cluster on two Red Hat Enterprise Linux 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?

Thanks,
Chris
 
You may start the java with:
Code:
java -server -Xms ... -Xmx ... ...
which is well known, but if you don't know java at all, it might be hard to find.
Code:
java -X
will give you a brief description of the -X... flags,
Code:
java
the for normal flags.

Basic documentation may be found at
Code:
file:///$JAVA_HOME/docs/guide/vm/index.html
or online from the sun-web-page.
 
FYI, someone from Sun said this...



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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top