Building apache and PHP with all its extensions may be fun once or twice but it is a major pain in the neck. So to avoid that (and to have it before Debian Squeeze is released) you can use e special dotdeb repository of almost everything that you may need as a web dev. It is especially convenient if you have a few development servers to update with different configurations and you don't want to waste too much time on it.
When you build PHP applications you need cache storage to keep your calculated data in. There are quite a few options and use case decides which solution is better.
I knew that APC is faster than memcached as there is much less overhead but I wanted to see how memcached would compare to APC user cache.
Monitoring of application and server health is an important task, while trying to maintain high availability. Without monitoring you dont know what goes wrong and you do not know when exactly does it happen. Some time ago i realized that the graphs i used to use were not perfect. I searched the web, read a bit of documentation and decided to put together a set of simple scripts gathering key server performance metrics.
This bundle includes gathering scripts and graph templates for Memcached, APC, Apache2, Linux file system, Linux memeory, CPU and Network. It should cover all the most important aspects for a typical web server. Graphs are designed to match my expectations and to make analysis easier.
I still dont have postgres, sphinx nor mysql stats included but .... who knows .... maybe in version 4! :- )
After some more work on the weekend and playing around with cacti i have fixed up some of the previous scripts and joined input methods with data sources and graphs all together.
I have also added a host template so now adding servers will be much easier you just enter host name and click ccreate graphs ... job done.
Package includes graphs to monitor Linux system metrics, disk IO, network IO, apache status, APC op code cache, memcached.
Im still adding stuff to it so make sure to come back for an update : -)
You can see some of the graphs in earlier versions here:
APC is one of the best PHP op code caches. To be sure its performing the best it can you should monitor its status and make sure it has enough memory as well as correct ini settings.
You want to monitor memory allocated for op code cache as well as user stored items. Its important to get it right as wrong settings may reset your complete cache once it gets full:
You should also monitor the hit and miss ratio for op code file cache:
PHP has a very useful extension for caching op codes as well as custom values from php code. The problem is that it does need additional parameter to be enabled in the command line interface (unit tests or cron scripts).
About the author
Hi, my name is Artur Ejsmont,
welcome to my blog. I am a passionate software engineer living in Sydney and working for Yahoo!
If you are into technology, you can order my book Web Scalability for Startup Engineers on Amazon. I would love to hear what are your thoughts so please feel free to drop me a line or leave a comment.