When PHP scripts are loaded they're compiled to bytecode, then the bytecode is executed. Stock versions of PHP just throw away the bytecode when they're done, so scripts are recompiled every time they're loaded -- ie, a million times a day or so. :P Any sensible PHP-based site uses a cache plugin of some sort; the PHP folks themselves sell a proprietary product that does this, Zend Optimizer, but there are alternatives.
Once upon a time we used APC, the Alternative PHP Cache, on Wikipedia's servers. It's open source, but at least at the time it had a lot of problems with not updating or getting stuck on old versions of scripts, and wasn't as fast as some of the alternatives.
At some point we switched to PHP-Accelerator, which is noncommercial but not open-source. It was faster and not as troublesome, but still occasionally did get stuck; particularly when class definitions changed it would become very confused. Also not being an open source component was a ding to our FOSS pride.
Another alternative is Turck MMCache. It's open source and claims performance as good or better than the competition. A couple people have tried it out and confirmed it works with MediaWiki... Since pliny has had a fresh operating system install with its new hard drive, I've gone ahead and put MMCache on it instead of installing PHPA.
So far so good, we'll see how it goes. (Pliny is now serving en.wikipedia.org.)
Info: http://turck-mmcache.sourceforge.net/
-- brion vibber (brion @ pobox.com)
I've switched ursula to Turck MMCache from PHP-Accelerator. We'll see if that helps with the intermittent memory madness problem...
-- brion vibber (brion @ pobox.com)
wikitech-l@lists.wikimedia.org