JVM Options tuning , using jdk 1.7

369 views
Skip to first unread message

cruc...@gmail.com

unread,
Aug 22, 2012, 5:07:34 AM8/22/12
to mobicent...@googlegroups.com
Hi all,

    Just want to post a question out there to get your input. 
    What JVM options do you use for your Mobicents server ?

    I'm currently using JAIN SLEE server 2.4.0, with java jdk 1.6.0 u27 with this options: 

    JAVA_OPTS="-Xms32000M -Xmx32000M -Xmn4000M -XX:MaxPermSize=2000M -Dorg.jboss.resolver.warning=true -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -XX:CMSInitiatingOccupancyFraction=60 -XX:+UseConcMarkSweepGC"

   The full GC that occurs every hour pauses my system for about 20 - 30 seconds :).

   So I plan to upgrade to JAIN SLEE 2.7.0 , and upgrade the jdk also to the latest 1.7.0.

   Also want to replace the ConcMarkSweepGC with the new G1 GC available in jdk 1.7. So it will be something like : -XX:+UseG1GC -XX:MaxGCPauseMillis=500 (to impose also a pause limit)

   So, any advices? 




Vilius Panevėžys

unread,
Aug 22, 2012, 5:30:39 AM8/22/12
to mobicent...@googlegroups.com
Hi!

On Wed, 22 Aug 2012 02:07:34 -0700 (PDT)
"cruc...@gmail.com" <cruc...@gmail.com> wrote:

> JAVA_OPTS="-Xms32000M -Xmx32000M -Xmn4000M -XX:MaxPermSize=2000M

That's a huge heap, I'd guess that's the main reason for pauses. Do you
really need it so? Even though memory is cheap, the strategy "throw at
it all you've got" is bad for time constrained Java applications. You
need to choose the optimal heap size depending on the type of the
application, expected load, etc.

If you do something like in-memory data storage, I'd consider a way to
move it out of JVM and thus out of the general GC lifecycle.

> Also want to replace the ConcMarkSweepGC with the new G1 GC
> available in jdk 1.7. So it will be something like : -XX:+UseG1GC
> -XX:MaxGCPauseMillis=500 (to impose also a pause limit)

MaxGCPauseMillis is just a hint (it might not be possible to meet that
goal, e.g. due to a huge heap or due to the machine underperforming
for any other reason). And using ergonomics suggests to minimize other
"hand-tuning" as the more fixed values you set, the less space is left
for JVM self-tuning, which is the idea behind ergonomics and the usage
of hints like MaxGCPauseMillis.

> So, any advices?

From what I've gathered from various web resources is that the general
attitude towards modern JVM tuning is "less is more". :) That is, do
less hand tuning and leave more space for JVM self-tuning because it
has a lot more _actual_ data in runtime to do that, which would take a
lot of profiling for the developer to gather. And you'd need to redo
that over and over after any change in the behaviour of your system,
change on the shape of the load, etc.


--
Vilius Panevėžys
Elitnet

cruc...@gmail.com

unread,
Aug 22, 2012, 5:59:00 AM8/22/12
to mobicent...@googlegroups.com
Hi,

    Thanks for the answer.

    BTW I'm using it as a Diameter server, getting about 100 request per second, and having about 60.000 sessions active simultaneously. So also that many activity contexts active also. That's why I've configured initially 32 GB of heap :). I know for a fact that it is more than I need.
Reply all
Reply to author
Forward
0 new messages