db-art / mysql-statsd

BSD 3-Clause "New" or "Revised" License
99 stars 36 forks source link

Multiple buffer pool instances #26

Closed erezzarum closed 8 years ago

erezzarum commented 9 years ago

If one is having multiple buffer pool instances (innodb_buffer_pool_instances), metrics sent to statsd regarding the buffer pool will mostly be the value of the last instance. I believe the best way is to check if that variable is already initialized in the dictionary.

art-spilgames commented 9 years ago

We are not using the multiple bufferpool instances yet, but it is definitely something on our wish/test/implement list. So I will have a look at it.

What would be a favorable implementation for this? Loop over the instances and aggregate them or store/send all of them separately?

erezzarum commented 9 years ago

For me (i can't say for the rest) it will be great to see just an aggregation, this implementation is easier to do as the first occurrence shows the total (i.e: first occurrence of "modified db pages" is the total).

Perhaps the best way to implement it is to check if we already stored those metrics which are specific for the buffer pool (i.e: did we store a metric for "modified db pages" , etc..)

Thanks!

art-spilgames commented 9 years ago

Sorry for the long wait, but as we are at the end of the year we had some time to spare. ;) It was a bit easier than checking whether we stored it already or not as the format is basically unchanged and only the individual statistics have been added in a separate section.

What I for now is to isolate the individual bufferpool section and not have this processed. There is already an average/total section so there is no need to process them. The avg/total section will naturally be picked up by mysql_statsd.

I'm currently testing the individual statistics as well, but that takes a bit more effort as I need to introduce a bit more. I'll try to tidy up my code and get my colleagues to merge it.

art-spilgames commented 9 years ago

Created the individual parser as well and it works like a charm. Now you can also see how well multiple bufferpools perform compared against each other. The pull request: https://github.com/spilgames/mysql-statsd/pull/28