Tomcat.exe is consuming 75% of CPU. Is anyone having any idea why it happens and how can that be decreased?
I am using Tomcat5.5 & J2SDK v 1.4.2_12
High CPU usage appeared after a system update that can change permissions to access folders and files. Thus the reason for high CPU usage can be external to the web application and also external to Tomcat container.
Apache Tomcat - Performance Issue (CPU Usage at 98%!) Since 13.2, we have had a performance issue. Twice now I’ve found tomcat9.exe process using more than 50% CPU on this server. Right now, it’s using >97% CPU continuously.
Lambda Probe is a very handy tool for monitoring Tomcat. Are you using a quad CPU system? Probably Tomcat is running 100% in 3 of them. I would first test for an infinite loop or something like that in an application.
Probably Tomcat is running 100% in 3 of them. I would first test for an infinite loop or something like that in an application. Show activity on this post. First of all (this applies to all java applications) you must pin down which thread is using CPU.
If you're using 75% CPU and dont understand why, I suggest you issue a kill -3 to the tomcat process (ctrl-break if you have a console) to get a thread dump (when the load is high!). In my experience most threads should either be idle or in io-wait. Look for any single branch of code that has repeated occurences in the stack traces and that's your likely culprit (non-io waits!). This is the "poor man's profiler" that is quite often the best and most efficient way to solve these problems.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With