Linux and PHP web application support and development (Bromsgrove, UK)

tel: 0845 0046746

Server resource graphing and monitoring with munin

We use munin to monitor servers to help identify server performance issues (and improvements). It’s a great tool, and we keep finding the need to install it.

Munin compromises two parts – firstly ‘munin-node’ which runs as a daemon, and is responsible for running various plugin (statistics retrieval) scripts and storing the output values. ┬áTypically plugins exist for all common services (MySQL, Apache, memcached, CPU usage etc). Secondly, a cron job┬áprocesses the stored data to make pretty graphs which are accessible to the end user through a web browser. For example :

Munin graph showing MySQL Queries over time

Munin graph showing MySQL Queries over time

Munin graph showing MySQL queries and throughput

Munin graph showing MySQL queries and throughput

In the case of the above, it’s easy to see that on around the start of Week 21 something significantly changed the amount of ‘work’ MySQL was doing – in this case, we’d been doing some performance optimisations on WordPress and there was a significant improvement recorded. Without a long term plot of traffic, it would have been difficult for us to quantify the improvement.

In another scenario, we increased the amount of memory used by memcached – expecting to see a reduction in MySQL traffic (as more data ought to be cached in memory). Did it help? Not in this instance.

Leave a Reply

Your email address will not be published. Required fields are marked *