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 :
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.