Hi,
I'm not a server admin or a Java guru, so hopefully someone on the list can help me out. My XForms app has a tendency to force Tomcat to run out of PermGen space. It's not an overly-complex application, but I also have Cocoon and Solr running in Tomcat. The server is running in a clustered environment and designated 512MB of memory. I have set my max heap space to 480M, min heap space to 256M, and I even set max PermGen to 256M. I'm still getting an PermGen error when Orbeon and Cocoon are processing concurrently. If there's no action in Orbeon, the Cocoon/Solr apps will run indefinitely. Has anyone run into problems with the PermGen space? How do I tell if garbage collection is working correctly? Thanks, Ethan -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
Hi Ethan,
I've had PermGen errors but never conclusively attributed them to Orbeon. You might try setting these options: If you have a multi processor machine, behaving like a webserver, change the GC used: JAVA_OPTS="$JAVA_OPTS -XX:+UseConcMarkSweepGC" To allow the GC to operate in the PermGen spaces, try setting these (rarely documented, I find) options: JAVA_OPTS="$JAVA_OPTS -XX:+CMSPermGenSweepingEnabled" JAVA_OPTS="$JAVA_OPTS -XX:+CMSClassUnloadingEnabled" Set your Xms and Xms to the same value - the JVM won't have to rationalise the difference then. Set your young generation space explicitly - the default may not be high enough JAVA_OPTS="$JAVA_OPTS -XX:NewSize=900m -XX:MaxNewSize=900m" (Be proportional - my heap is set at 1.5G) Use JConsole to monitor the effects of your changes. To enable JConsole to monitor the container memory, set the following, or such: CATALINA_OPTS="$CATALINA_OPTS -Dcom.sun.management.jmxremote \ -Dcom.sun.management.jmxremote.port=9004 \ -Dcom.sun.management.jmxremote.ssl=false \ -Dcom.sun.management.jmxremote.authenticate=false" (Jconsole should be in your - JDK on Solaris it's under /usr/java/bin/) I believe that when GC is working correctly: You won't get out of memory errors. If you achieve that, then afterwards, you are probably tuning for efficiency. You should see regular waveforms in JConsole with GC colection occuring quickly and just below memory ceiling thresholds. My Young gen is a sawtooth pattern, Old Gen is stepped and PermGen more or less a static line. GCs take on average 0.3 seconds. The reason I say all of the above and appear to be going off topic, is that I believe the PermGen errors you are seeing may be disguised and you have another problem. My PermGen is maxed at 128m and it never appears to go beyond 70m, I'm running 10+ apps two (Orbeon and Fedora Commons) are large. Hope that gives you some things to try and that I haven't led you down the wrong path. Best wishes, Tom
|
Thanks a lot for your help, Tom. It appears to have resolved the problem! PermGen space issues were really starting to make me sweat.
Ethan On Tue, Sep 15, 2009 at 5:19 AM, Tom Grahame <[hidden email]> wrote:
-- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
In reply to this post by Tom Grahame
Tom,
Great information! I am linking it from our "Performance and Tuning" wiki page: http://wiki.orbeon.com/forms/doc/developer-guide/performance-tuning -Erik On Tue, Sep 15, 2009 at 2:19 AM, Tom Grahame <[hidden email]> wrote: > > Hi Ethan, > > I've had PermGen errors but never conclusively attributed them to Orbeon. > You might try setting these options: > > If you have a multi processor machine, behaving like a webserver, change the > GC used: > JAVA_OPTS="$JAVA_OPTS -XX:+UseConcMarkSweepGC" > > To allow the GC to operate in the PermGen spaces, try setting these (rarely > documented, I find) options: > JAVA_OPTS="$JAVA_OPTS -XX:+CMSPermGenSweepingEnabled" > JAVA_OPTS="$JAVA_OPTS -XX:+CMSClassUnloadingEnabled" > > Set your Xms and Xms to the same value - the JVM won't have to rationalise > the difference then. > > Set your young generation space explicitly - the default may not be high > enough > JAVA_OPTS="$JAVA_OPTS -XX:NewSize=900m -XX:MaxNewSize=900m" > (Be proportional - my heap is set at 1.5G) > > Use JConsole to monitor the effects of your changes. To enable JConsole to > monitor the container memory, set the following, or such: > > CATALINA_OPTS="$CATALINA_OPTS -Dcom.sun.management.jmxremote \ > -Dcom.sun.management.jmxremote.port=9004 \ > -Dcom.sun.management.jmxremote.ssl=false \ > -Dcom.sun.management.jmxremote.authenticate=false" > > (Jconsole should be in your - JDK on Solaris it's under /usr/java/bin/) > > I believe that when GC is working correctly: You won't get out of memory > errors. If you achieve that, then afterwards, you are probably tuning for > efficiency. You should see regular waveforms in JConsole with GC colection > occuring quickly and just below memory ceiling thresholds. My Young gen is a > sawtooth pattern, Old Gen is stepped and PermGen more or less a static line. > GCs take on average 0.3 seconds. > > The reason I say all of the above and appear to be going off topic, is that > I believe the PermGen errors you are seeing may be disguised and you have > another problem. My PermGen is maxed at 128m and it never appears to go > beyond 70m, I'm running 10+ apps two (Orbeon and Fedora Commons) are large. > > Hope that gives you some things to try and that I haven't led you down the > wrong path. > > Best wishes, > > Tom > > > Ethan Gruber wrote: >> >> >> Has anyone run into problems with the PermGen space? How do I tell if >> garbage collection is working correctly? >> >> > > -- > View this message in context: http://www.nabble.com/Tomcat-Java-memory-optimization-tp25447559p25450769.html > Sent from the ObjectWeb OPS - Users mailing list archive at Nabble.com. > > > > -- > You receive this message as a subscriber of the [hidden email] mailing list. > To unsubscribe: mailto:[hidden email] > For general help: mailto:[hidden email]?subject=help > OW2 mailing lists service home page: http://www.ow2.org/wws > > -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
Free forum by Nabble | Edit this page |