tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jesse Klaasse <>
Subject Re: Tomcat 100% CPU usage after moving from Java 5 to 6
Date Tue, 26 Jan 2010 08:48:25 GMT

I have now fixed the infinite loop, and again did the update from Java 5 to
Java 6. This time all seems to be working like a charm!

Along with fixing the infinite loop, I have dug a little deeper into the JVM
arguments. I found the following article particularly useful:

Using that article plus common sense, my arguments are now:
-Djavax.sql.DataSource.Factory=org.apache.commons.dbcp.BasicDataSourceFactory -XX:MaxPermSize=512m
-Xloggc:D:\logs\gc\tomcat-gc.log -X:+PrintGCDetails -XX:+UseConcMarkSweepGC
-XX:+UseTLAB -XX:+CMSClassUnloadingEnabled -XX:+CMSPermGenSweepingEnabled
-XX:+DisableExplicitGC -XX:NewSize=4096m -Xms10240m -Xmx10240m

The NewSize parameter was new to me, and it's explanation on the
aforementioned link made much sense.
A few things I'm still not completely sure about:
- I don't want any serial garbage collection to occur. I'm not sure whether
my arguments take care of this now..
- Do I still need the -XX:+UseTLAB argument?
- Do I still need the -XX:+CMSClassUnloadingEnabled flag?
- Do I still need the -XX:+CMSPermGenSweepingEnabled flag?

So, still some research to be done. 

In the meantime I am very pleased with the results. Tomcat's CPU usage seems
significantly lower than before (it's average seems about 10% now - which
was 30-40% before) - scary! 
View this message in context:
Sent from the Tomcat - User mailing list archive at

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message