If you are new to Ganglia this post might not make much sense. If you are interested in Ganglia I suggest you read this paper first to get a better understanding of how it works.
Over the past year I have been moving away from Munin and towards Ganglia for my server monitoring needs (for reasons that should go in another post). One of the nice things about Munin is the number of plugins that are included out the box. Ganglia is lacking in this department. The lack of time to re-write plugins was one of the initial obstacles preventing me from ditching munin altogether. Once I found the gmetric gem for ruby that all changed.
Using the gemtric gem you can write a ganglia plugin in ruby and send the metrics directly from your ruby scirpt without integrating the “gmetric” command line tool provided by Ganglia. The other nice thing about the gem is that it supports the “group” part of the ganglia message protocol. So you can specify a grouping for the metric you submit. Using the stock “gmetric” tool that ships with ganglia in Ubuntu, all data goes into an uncategorised group in ganglia.
Here is an example of a simple gmetric plugin using the gem. It counts some files in directory and reports them to the ganglia cluster:


MySQL: ERROR 1286 (42000): Unknown table engine ‘InnoDB’
I was asked to review a application recently that had some performance issues. The db engine was MySQL and the database was getting hammered. Changing the behavior of the queries the app used was not a short term option so I started looking tuning at the MySQL configuration.
The box in question was a “large” EC2 instance (two cores, 8 GB RAM). With the MySQL data dir mounted on an EBS volume. One of parameters I tweaked was the “innodb_buffer_pool_size”. Out of the box it was set to 8MB which is fairly tiny. After reading some docs and blog posts on the subject, I decided to go with the suggested 50-80 percent. After setting the value to 4GB, I restarted and things were humming along.
I came back a while later and noticed this error in the app logs: Unknown table engine ‘InnoDB’ .
I logged into the mysql console and got the same error trying to run some simple SELECTs on data that I knew should be there. As it turns out MySQL will go ahead and shutdown the InnoDB engine if it has trouble allocating memory for the innodb buffer pool. I suspect the pool started off small and progressively grew and failed to find needed RAM. At which point it turned off InnoDB. Nice! Of course restarting MySQL would “fix” this issue for a while till it happened again, so I ended up turning it down a bit to reduce the chance of this happening again.
A couple of related posts I found useful:
InnoDB engine disabled when specifying a buffer pool size too high
Choosing innodb_buffer_pool_size