users@glassfish.java.net

Re: Debugging Glassfish CPU usage

From: Burak Oguz <burak.oguz_at_gmail.com>
Date: Mon, 6 Apr 2009 13:11:32 +0300

Hi all,

We are suffering with that CPU usage peeks in GFv3 b43 promoted. We
discovered that it has nothing to do with the applications loaded to GFv3.
It is a very strange behaviour because when garbage collector starts to run,
CPU usage never drops from 100% in Linux. We have profiled it via
Netbeans6.5 profiler. Our gc related jvm settings is below:

        <jvm-options>-server</jvm-options>
        <jvm-options>-XX:NewRatio=2</jvm-options>
        <jvm-options>-XX:PermSize=32m</jvm-options>
        <jvm-options>-XX:MaxPermSize=256m</jvm-options>
        <jvm-options>-XX:+UseConcMarkSweepGC</jvm-options>
        <jvm-options>-XX:+CMSPermGenSweepingEnabled</jvm-options>
        <jvm-options>-XX:+CMSClassUnloadingEnabled</jvm-options>
        <jvm-options>-Dsun.rmi.dgc.server.gcInterval=3600000</jvm-options>
        <jvm-options>-Dsun.rmi.dgc.client.gcInterval=3600000</jvm-options>
        <jvm-options>-Dcom.sun.
enterprise.server.ss.ASQuickStartup=false</jvm-options>
        <jvm-options>-Xms40m</jvm-options>
        <jvm-options>-Xmx512m</jvm-options>

In order to avoid PermGenSpace exception we have changed our GC to ConcMark
and after that it starts to give this non-understandable CPU usage issue.
Also we observed that it starts this strange behaviour when memory usage is
higher than Xmx which means GC starts to work. We tried too many
configurations but could not solve that problem.

Any help or idea will be greatly appreciated.

- Burak


On Mon, Apr 6, 2009 at 12:32 AM, <glassfish_at_javadesktop.org> wrote:

> Hi JF,
>
> Thanks for the help. Unfortunately, after 12 hours of running on JDK 7 b50
> the server exhibited the same increase in CPU usage and context-switch
> activity as before. Any other suggestions?
> [Message sent by forum member 'rwillie6' (rwillie6)]
>
> http://forums.java.net/jive/thread.jspa?messageID=340680
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
>