2 Replies Latest reply on Nov 8, 2012 6:40 PM by John Grunthop

    Heavy PermGen Usage?

    John Grunthop Newbie

      Greetings--

       

      I've inherited an application that is built on top of GateIn Portal 3.1. The application has dozens of users, maybe hundreds-- hard to say at this point-- and the way it's designed, each one of these users has her own page with different portlets displayed depending on the permissions associated with their account. The application also has a custom skin.

       

      I'm seeing a lot of permgen consumption whenever someone logs in. Upon login of any user, permgen usage goes up by two megabytes. Naturally I've been looking at the application first, finding opportunities to reduce permgen consumption there; but as I'm not familiar with GateIn Portal, I wanted to get opinions from you guys as well. Given that there's a custom skin loading in a lot of static resources (jQuery UI), is there anything that you guys know about the way GateIn works that could possibly be causing so much permgen consumption on login?

       

      Thanks!

        • 1. Re: Heavy PermGen Usage?
          Minh Hoang TO Novice

           

          I'm seeing a lot of permgen consumption whenever someone logs in. Upon login of any user, permgen usage goes up by two megabytes.

           

          Did you check if N users login, permgen usage increases about 2*N megabytes (for quite large N)?

           

          I suspect the cause of such permgen leak (if any) is the use of String.intern() in code base of GateIn 3.1

          • 2. Re: Heavy PermGen Usage?
            John Grunthop Newbie

            I ran jmap -permstat in the test environment, and it tells me that only 7MB of permgen space is devoted to interned strings, which seems fine. After looking through the rest of the report, though, I'm a little confused.

             

            If I'm interpreting this report correctly, there are ~1500 instances of groovy/lang/GroovyClassLoader$InnerLoader in permgen, taking up almost 500MB. That seems impossible, since VisualVM tells me that only 400MB of permgen is being used in total at the moment.

             

            Groovy is used to render UI templates in EPP, though I'm still researching to determine how this many instances of GroovyClassLoader got into permgen. All of them are dead, and using the CMS JVM options for class unloading doesn't affect permgen usage in this case.