[phpa] Re: Stress Problem

On Thu, Dec 06, 2001 at 09:41:57AM +0100, Emmanuel FAIVRE wrote:
> 
> i'm back with the stress problem
> i just try the lastest 1.2 (last time i forget to erase tmp and flush
> the cache)
> 
> the result are the same
> in the beginning of the apache process i'm near 110 Req/s
> and after some strees test
> im near 80 Req/s and less
> 
> Perhaps we have a little memory leak ?
> for example i have 256 Mo of RAM
> 
> and after 10000 Req the memory is like
> Mem:  256900K av, 139880K used, 117020K free, 332232K shrd,  18828K buff
> Swap: 128516K av,   1444K used, 127072K free                 26716K cached
> 
> i really don't understand the 332Mo of shared Memory

> when i restart Apache
> 
> Mem:  256900K av,  91328K used, 165572K free,  42608K shrd,  18924K buff
> Swap: 128516K av,   1444K used, 127072K free                 26948K cached

I've checked carefully for memory leaks in the past with purify on Solaris 
and by observation with other tools, and I don't believe that there is
a leak. You may get a clue from the number of apache processes running after
just a few requests and once you have had made many requests. The number may
have increases dramatically. After a while the number may drop somewhat if
you have less requests.  If you suspect a leak, look at the memory in use
by individual processes and see if that is steadily increasing. 
Consecutive requests will typically go to different apache processes, but 
over time I would expect you to see the memory usage increase significantly
if there is a leak.

I've noticed that performance can drop over time, and also as the cache
gets fuller. It may be that you're getting less benefit from the processors
own caches over time.  I arrange code internally in phpa, in some places,
to try and maximise the utilisation of the CPU i-cache, but haven't 
done so aggressively as there are other things to work on and worry about.

A suggestion is to set a maximum requests value in the apache config such
that the apache processes die off after they've served a certain number of
requests.  For some sites this may make a difference, and it does seem that the
few requests a process has served, the faster it'll go.

As a last point, I observed the same behavior with Zend Cache as well, and so
I think this is related to factors not directly related to the cache itself.

Nick

------------------------------------------------------------------------
  www.php-accelerator.co.uk           Home of the free PHP Accelerator

To post, send email to phpa@xxxxxxxxxxxxx
To unsubscribe, email phpa-request@xxxxxxxxxxxxx with subject unsubscribe


Other related posts: