High CPU usage

High CPU usage

Postby beadly on Thu Jan 26, 2012 5:56 pm

We are running a gold version of Zend Server (5.6) and we are having issues with high CPU usage on the system. One or two jobs go up to around 40% of CPU usage each. It usually seems to happen during the night, but just today it started happening about an hour ago even after just being reset this morning. When this is happening I usually see a warning in the Zend event monitor that a script is having "high memory usage (relative)".

I am just wondering how I should go about finding out why the CPU usage is getting so high and why it stays there until a reset.

Thanks
beadly
 
Posts: 10
Joined: Fri Jan 14, 2011 10:39 pm

Re: High CPU usage

Postby erich_hieden on Thu Jan 26, 2012 7:05 pm

You can see which script is causing the high memory usage in the Admin GUI. Which jobs are going up on CPU usage?
erich_hieden
 
Posts: 347
Joined: Tue Jul 07, 2009 9:01 am

Re: High CPU usage

Postby beadly on Thu Jan 26, 2012 7:18 pm

The script is just index.php which doesn't have anything on it that doesn't get called on other pages, so I'm not sure why it is only that script.

The subsystem/job is "ZENDSVR" and Function is "PGM-php-cgi.bi".
beadly
 
Posts: 10
Joined: Fri Jan 14, 2011 10:39 pm

Re: High CPU usage

Postby erich_hieden on Fri Jan 27, 2012 7:20 am

If I guessed (and that's the only thing I can do without seeing that script), I'd say it's a SQL-query that returns lot of records. Check if there are other jobs having high CPU usage as well (Look espacially at the QSYSWRK/QSQSRVR jobs). You can easily do this placing your cursor in the CPU column in WRKACTJOB and then pressing F16 (and then refreshing of course).
erich_hieden
 
Posts: 347
Joined: Tue Jul 07, 2009 9:01 am

Re: High CPU usage

Postby beadly on Fri Jan 27, 2012 4:14 pm

erich_hieden wrote:If I guessed (and that's the only thing I can do without seeing that script), I'd say it's a SQL-query that returns lot of records. Check if there are other jobs having high CPU usage as well (Look espacially at the QSYSWRK/QSQSRVR jobs). You can easily do this placing your cursor in the CPU column in WRKACTJOB and then pressing F16 (and then refreshing of course).


Thank you for the suggestion. Zend server isn't having the high CPU usage right now, but I will look if i notice it creeping up again. When I was looking at it yesterday, I did notice there was another job running at about 6-9%, but it looked like one that was calling a system program. Is it possible that the system program was looping and causing Zend server to have issues?
beadly
 
Posts: 10
Joined: Fri Jan 14, 2011 10:39 pm

Re: High CPU usage

Postby erich_hieden on Fri Jan 27, 2012 4:29 pm

beadly wrote:Thank you for the suggestion. Zend server isn't having the high CPU usage right now, but I will look if i notice it creeping up again. When I was looking at it yesterday, I did notice there was another job running at about 6-9%, but it looked like one that was calling a system program. Is it possible that the system program was looping and causing Zend server to have issues?

If the program was called by ZendServer then yes, otherwise I don't think so. That's why I suggested looking at the QSQSRVR jobs, which are responsible for serving the SQL queries. If the second job were a program you called in your PHP script, you'd tell me, wouldn't you? ;-)

Have a nice weekend.
erich_hieden
 
Posts: 347
Joined: Tue Jul 07, 2009 9:01 am

Re: High CPU usage

Postby beadly on Fri Jan 27, 2012 10:48 pm

erich_hieden wrote:If the program was called by ZendServer then yes, otherwise I don't think so. That's why I suggested looking at the QSQSRVR jobs, which are responsible for serving the SQL queries. If the second job were a program you called in your PHP script, you'd tell me, wouldn't you? ;-)

Have a nice weekend.


Oh, it most definitely is a program I call. I call it very often, and it doesn't seem to ever have an issue for most of the day. I was thinking that if it was a script issue that it would be happening all the time. Right now it only seems to happen after hours, and when we check in the morning we see it eating up the CPU.
beadly
 
Posts: 10
Joined: Fri Jan 14, 2011 10:39 pm


Return to Zend Server for IBM i

Who is online

Users browsing this forum: No registered users and 1 guest