The Source for Java Technology Collaboration
User: Password:
Register | Login help    

Search

Online Books:
java.net on MarkMail:


Configuring Grizzly for performance part I: JVM options

Posted by jfarcand on January 3, 2007 at 8:08 AM PST

I'm getting a lot of questions those days about how to configure Grizzly to get the best performance. In part I, I will share what we have learned so far(thanks to Scott for his help!)

perf.jpg

First, if you are using Grizzly in GlassFish, makes sure you remove in domain.xml the following jvm-options:

-Xmx512 -client -Dsun.rmi.dgc.server.gcInterval=3600000
-Dsun.rmi.dgc.client.gcInterval=3600000

and replace it with

-server -XX:+AggressiveHeap -Xmx3500m -Xms3500m -Xss128k
-XX:+DisableExplicitGC
-Dcom.sun.enterprise.server.ss.ASQuickStartup=false

For anything other than Solaris/SPARC, 3500m needs to be 1400m. On a multi-CPU machine, add:

-XX:ParallelGCThreads=N -XX:+UseParallelOldGC

where N is the number of CPUs if < 8 (so really, you can leave it out altogether in that case) and N = number of CPUs / 2 otherwise. On a Niagara, add:

-XX:LargePageSizeInBytes=256m

Et voila!

technorati:

Related Topics >> Java Enterprise      
Comments
Comments are listed in date ascending order (oldest first)