munin-mysql icon indicating copy to clipboard operation
munin-mysql copied to clipboard

feature request (database and table sizes)

Open ludwig-gramberg opened this issue 11 years ago • 6 comments

just like in that other plugin :-)

ludwig-gramberg avatar Nov 23 '14 12:11 ludwig-gramberg

While certainly possible it's important to realise that this can be a reasonably heavy check if you use information_schema, especially for InnoDB tables. It'd be lots lighter to do from the filesystem; but again, InnoDB gets in the way if you don't use file-per-table, which is off by default.

Those two make it, in my opion, not something that should be enabled by default on all servers. There is no denying that there is a usecase for such a plugin, however - which is why I threw one together myself (in bash). You can grab it at https://ssl.tuxera.be/filestore/eequeequaivo if you want it; but be warned that it's quick and dirty, and I offer no warranties whatsoever :-)

Also, that link is valid until Dec 1. Get it while it's hot :-p

meersjo avatar Nov 24 '14 10:11 meersjo

argh I missed the link ;p

the check could be done once a day and file-cached ?

mysqltuner gives fragmentation stats too (space loss), could be usefull

quazardous avatar Jul 04 '16 08:07 quazardous

I'll make you a new link for the bash one in a moment.

However, in my own fork of this repo is also a SchemaSize.pm module. That does depend on a number of modifications I made in the main module, too, and it relies on a dirty hack to dodge the InnoDB speed issue. YMMV.

I really should bother doing a pull request for those changes, but I'm not convinced they're quite clean enough to get accepted :-p

meersjo avatar Jul 05 '16 09:07 meersjo

The new link for the bash dbsize plugin is https://ssl.tuxera.be/filestore/xaeziengiequ - valid until july 12th near noon GMT.

Remember that this does NOT have the speed hack, so will take longer as your tables get bigger.

meersjo avatar Jul 05 '16 09:07 meersjo

thx !

quazardous avatar Jul 05 '16 09:07 quazardous

@kjellm - would you mind having a look at the modifications I did to the main file and the contrib/Schemasize.pm to see wether you'd like them in a pull request? Mostly concerns commit 7faa2db8092b50a48bd429aa3e0495a4da7f8443 I think.

The hack in SchemaSize.pm impacts automatic statistics gathering on InnoDB tables, so it's quite possible that it wrongly remains off if the process were to exit prematurely (connection killed by admin, for instance).

meersjo avatar Jul 05 '16 09:07 meersjo