Glassfish Application Server Performance tunings

If you want to improve performance of your application running on Glassfish application server, you can try out following JVM options. We got significant performance improvement by using them.

<jvm-options>-server</jvm-options>
<jvm-options>-Xms3000m</jvm-options>
<jvm-options>-Xmx3000m</jvm-options>
<jvm-options>-XX:MaxPermSize=192m</jvm-options>
<jvm-options>-XX:NewRation=2</jvm-options>
<jvm-options>-XX:+AggressiveHeap</jvm-options>
<jvm-options>-XX:+AggressiveOpts</jvm-options>
<jvm-options>-XX:+UseParallelGC</jvm-options>
<jvm-options>-XX:+UseParallelOldGC</jvm-options>
<jvm-options>-XX:ParallelGCThreads=5</jvm-options>

By using these performance tunings, we are able to get almost 30% more TPS (Transactions per Seconds).If I can be helpful, please do let me know. I have spent enough time on Glassfish and OpenESB performance tunings.

2 comments:

yuva said...

Hi Joshi,
The above post was really helpful to me. Thanks for that.

Have you worked on JMS finetuning. The scenario is , we use the JMS server(7676) running on default glassfish domain . When we process thousand of messages (avg size 5KB), all the messages occupy JVM memory and throws OutOfMemory excpetion at some time.
We have the persistence enable for JMS.

The expectation is to page the messages if it has exceeded some threshold or before the JVM memory is full. Can you please help me on that.

Thanks
Yuva

Dario said...

Thanks Joshi,

Your settings were really helpful in order for us to successfully deploy a Groovy & Grails application to Glassfishv3. It was bringing our app server down when deploying through the GUI or through autodeploy folder. The worst part was that we could not bring the app server back up until we added your settings.

Just out of curiosity where did you get that knowledge from docs, training, a specific book that we should buy?

Thanks