Two Laptop Bag
The moose likes Tomcat and the fly likes Tomcat eats a lot of CPU Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Tomcat eats a lot of CPU" Watch "Tomcat eats a lot of CPU" New topic

Tomcat eats a lot of CPU

Andrei Antonescu
Ranch Hand

Joined: Jul 08, 2010
Posts: 75
Hello all,

I am having an app deployed on a Tomcat 6 instance. The webapp is accessed by a lot of users every day. However in some days the CPU is almost at 90% (Tomcat eats a lot of processing power).

Do you have any idea how I can find out what's causing the high CPU consumption?

I have instaled "Probe" profiler & found nothing special.

Thanks in advance
William Brogden
Author and all-around good cowpoke

Joined: Mar 22, 2000
Posts: 13035
My first thought for problems like this is to use the Tomcat Management app. It will show you what all the request handling threads are doing and how much time they have been running.

Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 17410

"Tomcat" isn't eating a lot of CPU. Tomcat is specifically designed NOT to eat a lot of CPU. If you deploy a Tomcat server with no apps installed and it runs heavy CPU, there's something wrong. Generally involving Virtual Memory thrashing (which is an OS/hardware issue, not Tomcat).

Applications and services installed under Tomcat, however, they're another story...

An IDE is no substitute for an Intelligent Developer.
I agree. Here's the link:
subject: Tomcat eats a lot of CPU
It's not a secret anymore!