Tomcat using CPU time while doing nothing

Issues and Questions related to running Apache Tomcat on z/OS
Post Reply
billybarron
Posts: 1
Joined: Tue Sep 12, 2006 3:47 pm

Tomcat using CPU time while doing nothing

Post by billybarron »

I am running Tomcat 5.0.28 on an IBM mainframe. With JRE 1.3.1, Tomcat starts and then when idle takes up virtually no CPU.

However, with JRE 1.4.2, it takes up about 5% of CPU without any users ever hitting it after startup. With 1.5, it is about at 2.5%.

This is reproducable both on z/OS 1.4 and 1.7.

autoDeploy is turned off.

Does anybody know what could be causing this and how to resolve it?

1.3.1 is no longer supported by IBM so staying on it long-term is not a solution.

Thanks.
lstpierre
Posts: 9
Joined: Mon Sep 11, 2006 10:38 am
Location: MTL, CANADA

Tomcat using CPU time while doing nothing

Post by lstpierre »

I have the same behavior and the same setup as you. I opened an issue with IBM and they are still investigating. From what I can see the CPU comsumption comes in periodic burst letting me think that there is a execution threads (the garbage collector ???) that goes on a CPU intensive phase and then goes to sleep. Just a theory. If IBM ever comes back to me with an explanation or a corrective measure I will post it back here.

Cheers
tfull
Posts: 15
Joined: Mon Oct 10, 2005 4:27 pm

Post by tfull »

Does the consumption continue forever, or will it subside after a while? It might be related to JIT algorithm changes in the different JVM's. I would expect the JIT processing to subside after a period of time.
lstpierre
Posts: 9
Joined: Mon Sep 11, 2006 10:38 am
Location: MTL, CANADA

Post by lstpierre »

In my case the CPU consumption was permanent although sporadic and seemed to come at regular interval (which prompted me to think that the garbage collector thread might be involved). IBM could not reproduce the behavior in their lab and made me try different things. One of those things was to turn off the JIT compiler at initialization which did not fix the high CPU consumption at startup and the subsequent CPU consumption while idle. They suggested to put the LE libraries ( SCEERUNx) into the LPA but I did not try that yet and don't know when I'll get around to do it. Anyhow I was satisfied that it was probably related to our environment and closed the ticket with IBM.
tfull
Posts: 15
Joined: Mon Oct 10, 2005 4:27 pm

Post by tfull »

We've also seen spikes like that related to garbage collection. When we added -Xgcpolicy:optavgpause to the java options, we were able to get rid of the spikes, and it seemed to provide a more consistent user experience. According to the doc, this might actually take a bit more CPU in the long haul, but the removal of the spikes and improved customer experience made it worth the cost.
Post Reply