Richard Lynch wrote: > On Tue, January 17, 2006 11:18 pm, Albert wrote: > > The page having the heaviest load uses 5 simultaneous sessions - they > > refresh every 5 seconds. Even with just one connection there are 16 > > Apache > > threads running all occupying between 5 and 20% of CPU. > > Are you saying that you have a page that chews up 5 HTTP connections, > and each uses PHP heavily, and you reload that page every 5 seconds? I have a page that loads which never refreshes. It displays three images generated with PHP. The three images updates at least once every 5 seconds because the content actually changes. It also has an information page displaying information about the three images which also updates every time the image changes. > Maybe you shouldn't do that... > > Stretch it out to 10 seconds and see where your load goes. At 10 seconds all the problems disappear. Unfortunately the customer requires this to update at least every 5 seconds. > Find out which of the 5 sessions is most expensive (slowest). Can you > cache the results of that one? How about the second slowest? Can you > cache ANYTHING to make the application faster? I am now busy converting the three images and info page to use a cached copy if they have not changed. > > Does anyone have an idea of what I can do (short of recoding)? > #1. Buy more hardware, and build a server farm. On the lowest end of the spectrum (up to 5 simultaneous users) I have to make it work on a Celeron 400 with 512MB RAM. At the highest end (up to 100 simultaneous users) I have a Dual Xeon 3.4GHZ with 2GB RAM and SCSI drives. > #2. Buy the Zend Cache Will probably to that for the top end machines. The Zend Cache costs more than my lowest end machine after assembly. > #3. Install some other Cache product (most of which aren't as > good/fast/solid as Zend Cache, imho) I tend to trust Zend a bit more than the other developers (maybe because PHP is based on the Zend engine). If I didn't have budget constraints then I would have had the Zend Cache on each and every machine leaving my office. Albert -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.375 / Virus Database: 267.14.20/234 - Release Date: 2006/01/18 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php