Posted By: Tony Baird
Last Updated: Saturday January 31, 2009
For the past few days I’ve been playing around with eAccelerator on one of our hosting machines. Sounds pretty bad, but it’s completely controlled and I was quite confident it would run just fine. It is running just fine and has been for a few days and overall it’s made a tiny difference in overall load but not to much. The reason for this is the machine is not having issues with PHP serving but something else. But the caching of compiled PHP scripts still reduces CPU usage a bit and speeds up how quickly PHP pages load so it’s still worth it.
We’ve ran eAccelerator in the past with mod_php so I knew what to expect but it still has been a long time as we were using suPHP for ages. The one question mark in my head was just how much space would our cache directory take up in eAccelerator if we let it run without any real limitations put onto it. Well at this point in time it’s using a massive 3.7GB! This with most guides telling the person to put the cache directory in the tmp folder which would mean at this point we’d have almost filled our tmp folder twice! I’m going to let this to continue to run for a few weeks to get a real idea on how big our cache directory will be once everything is actually cached.
So I guess the one thing that I really wish it had was a way to get rid of stale cache files. It’ll do it with the shared memory portion but for the cached PHP files it does not. To me this can get out of hand if you are caching sites that receive 1 visitor a day yet you are stuck caching 30MB of PHP files or some silly amount.
Anyways I’ll probably post a follow up in a few weeks to talk about us putting it on all machines and in the end just how much space was used up by the cache directory.