-
Notifications
You must be signed in to change notification settings - Fork 752
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Collect innodb table and index stats #529
base: main
Are you sure you want to change the base?
Collect innodb table and index stats #529
Conversation
fb765d9
to
c331ae5
Compare
Fixes #389 |
Nice work! 👏 In a future iteration, what do you think about adding CLI flags to be able to specify which schema and table to watch? In a big deployment exporting metrics for all database/tables can be expensive. |
I think that would be wise to add to this PR. When I first started on this work I knew 0 golang. I now know 1 golang and can probably suss it out. |
@pgporada I'm curious how you're updating these stats, are you calling ANALYZE TABLE on a regular cadence or do you just have enough row churn that they get regular updates? Per https://mariadb.com/kb/en/innodb-system-variables/#innodb_stats_auto_recalc you need ~10% of the rows to get touched for a stats refresh. |
@mdkent I've not had a chance to pick this back up since I stated that I would try 16 days ago. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The problem with these generic stats dumps is that they're not useful without some extended documentation/help.
In Prometheus, we tend to avoid generic data dumps. Rather, we create opinionated names/mappings so that the end users doesn't have as much work to do in order to understand the meaning of the metrics.
Signed-off-by: Phil Porada <[email protected]> Signed-off-by: Phil Porada <[email protected]>
Signed-off-by: Phil Porada <[email protected]> Signed-off-by: Phil Porada <[email protected]>
Signed-off-by: Phil Porada <[email protected]> Signed-off-by: Phil Porada <[email protected]>
Signed-off-by: Phil Porada <[email protected]>
Signed-off-by: Phil Porada <[email protected]>
Signed-off-by: Phil Porada <[email protected]>
3689c1c
to
1f55bc3
Compare
@SuperQ Where should I do that, in the README.md or in the specific .go files? The mysql-server:5.7 broken test seems unrelated to this change fwiw. |
Hi,
We found this information useful in troubleshooting some database performance issues at my job. I hope this information can be useful for others who run multi-TB sized databases with tons of indices.
Information regarding these metrics can be found at
The metric descriptions where mostly copy pasted from https://dev.mysql.com/doc/refman/5.6/en/innodb-persistent-stats.html
Using a test mariadb container, the new metrics will appear as