Re: Random Performance Problems

From: Date: Thu, 24 Apr 2003 01:08:30 +0000
Subject: Re: Random Performance Problems
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-145103@lists.php.net to get a copy of this message
Brandon Bell wrote:
No, were not using sessions. The only references I could find to garbage collection had to do with sessions, but the randomness of the delays seem similar to what I would expect if garbage collection was occuring.
Why do you say the randomness is what you would expect from garbage collection? To rule out gc, I think you can turn it off by setting: session.gc_probability = 0 and perhaps setting session.gc_maxlifetime to a very high number might also have some effect.
I wondered about this too. But I also thought that since the timing is occuring on the server from the start of the page to the end of the page, what effect would the client connection speed have on this?
I'm no expert on this but the apache process stays open until the client close the connection I think. So even though the page might be done building itself, until the server has sent all the bits to the client and the client has close the connection, the apache process is taking up cpu cycles.
Wouldn't the Apache server buffer the page output?
Yes. But didn't you say that your PHP code was getting stuck in a while() loop? Maybe I misunderstood, but if the PHP code is stuck in a while() loop then Apache can't buffer anything until the PHP script is done. Have you tried tuning some tests locally (even on the server itself)? Maybe write a small shell script that loops around requesting the same page from your server and keeping a record of how long each request took. If don't see any requests taking a long time then I think you can rule out problems with your code. HTH, Jean-Christian Imbeault

« previous php.general (#145103) next »