[phpa] Re: Info on occasional problems for very busy sites

  • From: "Nick Lindridge" <nick@xxxxxxxxxxxxxxxxxxxxx>
  • To: phpa@xxxxxxxxxxxxx
  • Date: Sun, 10 Mar 2002 19:51:34 -0000 (GMT)

> Yes, with Zend cache I had timestamp check set to off and when I
> changed scrpits I would just reset the cache.

Thinking about this again, I still need to stat the files in order to
determine the device and file numbers of a file. phpa doesn't use filenames
internally, but uses the unique number that every file has. This makes
internal lookups quicker. However it might be that doing that stat on the
file is still slower than comparing file paths. As an enhancement I could
add a 'stat cache' and see if it makes a difference, but I think that it's
better to spend time focussing on the things that make the biggest speed
improvements, and right now that would be finishing the next set of
optimisations to the code optimiser.
> I have about 60-70 php scripts (some big, some very small)
> Should I increase the cache size from the default 8Megs?

I don't know. I'd really recommend installing phpaca, it's very cool,
provided you have a browser supporting javascript and stylesheets.
Otherwise, just run:

  phpa_cache_admin -vm

You'll get output like:

shm size 8388608 bytes
mempool size 8372168
mempool bytes allocated 691060
mempool max bytes allocated 705988
mempool bytes free 7659968
mempool overhead 21140

The max bytes allocated obviously says the maximum ever in use at any one
point. If it's close to the limit then increase, else you might decrease the
amount. The other thing is to enable shm logging and check for messages
indicating that the cache has to flush entries to free up space. Then you
know that the cache is too small. The number of flushed files would
admittedly also be useful from the cache admin tool. 


  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: