I'm working on improving the performance of a MySQL server. I'm looking for something to monitor the performance of MySQL (as query per second) over time so that I can measure any improvements I make.
Are their any easy to use open source software that does this?
Thank you.
MySQL users have a number of options for monitoring query latency, both by making use of MySQL's built-in metrics and by querying the performance schema. Enabled by default since MySQL 5.6. 6, the tables of the performance_schema database within MySQL store low-level statistics about server events and query execution.
As we stated, MySQL Enterprise Monitor is a part of the paid MySQL Enterprise Edition. For all users of the MySQL Community, MariaDB or Percona Server, MySQL Enterprise Edition is not available. ClusterControl provides access to monitoring of MySQL in its free Community version.
I like the tool mytop. It's just like top
in the *nix world, but for MySQL itself. And it basically does exactly what you are asking...
As far as other optimization techniques, I personally really like using Apache Bench for testing MySQL queries. Basically, I create a simple script that does nothing but execute the query I want to improve. Then, I run AB on it with different concurrency settings. The benefit is that you get an idea on how the query scales, not just how fast it runs. Who cares if a query is fast for a single run. What you really care about is how fast in runs with load. So:
<?php
$my = new MySQLi($host, $user, $pass);
$my->query('SELECT foo');
Then, using AB:
ab -c 10 -n 10000 http://localhost/path/to/my/test.php
Then, by adjusting the concurrency parameter (-c 10
) you can test for different concurrent load. That way, you can really look at how your tweaks effect the exact query rather than guessing with other metrics.
MySQL workbench should do.
http://wb.mysql.com/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With