Re: Command-line PHP script CPU usage goes sky-high, stays there--why?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Per Jessen wrote:
> René Fournier wrote:
> 
>> However, the number of socket clients connecting in the past 3-4
>> months has steadily increased, and this seems to have exposed (if not
>> created) a strange performance "issue" with PHP 5.2.4, MySQL 5.0.45
>> and/or Mac OS X Server 10.4.11. (I say "and/or" because I am unsure
>> where the problem's cause really lies.) Basically, after the script
>> has been running for a day or so (processing essentially the amount
>> data that used to take two weeks), the CPU usage of the machine goes
>> from 30% (normal) to 80-90%. 
> 
> Have you tried stracing it to see what's really happening when the load
> goes that high?

am I correct that that would be done like so?:

strace -p <process id of php deamon>

Im a little new to this kind of coolness, I found this page which is very helpful:

	http://www.ibm.com/developerworks/aix/library/au-unix-strace.html

I was going to suggest using gdb to figure what the process is doing but figured it
wouldn't be handy to have the deamon running via gdb for 48 hours ... silly me didn't
grok that you can attach to an existing process (something that ibm article made clear
to me)

can't wait till my macbook arrives so that I can start to play with this kind of
stuff locally ... aka another excuse to justify the aluminium beast ;-)

> 
> 
> /Per Jessen, Zürich
> 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux