I'm also attempting to track down a cpu usage problem in tomcat. Can someone tell me how to generate thread dumps that includes the "cpu=" information like the ones Jesse attached?
"ajp-8009-18" Id=187 in RUNNABLE cpu=242046 ms usr=242015 ms blocked 315 for -1 ms waited 256 for -1 ms When I create a tomcat thread dump using "ctrl-break", it does not contain any cpu info: "RMI TCP Accept-5555" daemon prio=6 tid=0x26eeda60 nid=0xd58 runnable [0x2712f00 0..0x2712fd68] at java.net.PlainSocketImpl.socketAccept(Native Method) Jesse Klaasse wrote: > > I am running a production environment for a website (over half a million > hits per day), using Tomcat 5.5.20 (I'm stuck to that version due to > support restrictions) behind IIS 6 using JK connector 1.2.28, > tcnative-1.dll (1.1.19) on Windows Server 2003 R2 Enterprise x64 SP2 > (with 16 GB RAM). Until last week, I have been using Sun Java 5. Last > week I have upgraded the JDK to Sun Java 6. > The system uses a MS SQL Server 2005 database, which resides on another > server. > > That's when things went wrong. At first, all seemed fine (average CPU > usage seems lower than when using Java 5), but after an hour or so (30 > minutes - 1,5 hour max) after a Tomcat restart, Tomcat's CPU usage jumps > to 100% (average CPU usage using Java 5 is around 30-40%, peaks around > 60%). I can't really figure out what is causing this. I have retried > about 6 restarts (including a complete system reboot), but without any > success. When I move back to Java 5, the problems are gone. > > My Tomcat Java arguments: > -Dcatalina.base=D:\tomcat -Dcatalina.home=D:\tomcat > -Djava.endorsed.dirs=D:\tomcat\common\endorsed > -Djava.io.tmpdir=D:\tomcat\temp > -Djavax.sql.DataSource.Factory=org.apache.commons.dbcp.BasicDataSourceFa > ctory -Dcom.sun.management.jmxremote -XX:MaxPermSize=512m > -Xloggc:D:\logs\gc\tomcat-gc.log -XX:+PrintGCDetails -XX:+UseParNewGC > -XX:+UseConcMarkSweepGC -XX:+UseTLAB -XX:+CMSClassUnloadingEnabled > -XX:+CMSPermGenSweepingEnabled -Xms4096m -Xmx10240m > > Some further information which could be important: > - I have tried to reproduce the problems on my development environment > (using jMeter for generating server load), but without success; > - I have created some thread dumps during the 100% CPU periods (attached > as a zip file); > > I would really like to make the move to Java 6, since Java 5's is EOL. > Any ideas, anyone? > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > -- View this message in context: http://old.nabble.com/Tomcat-100--CPU-usage-after-moving-from-Java-5-to-6-tp27305110p28527724.html Sent from the Tomcat - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org