Data-driven MySQL performance tuning
A simple MySQL performance tuning can speed your application significantly. Before tuning, however, you need actionable data about your database's current performance.
A MySQL database performance checklist before tuning could look like this:
- Verify your hosts’ health by looking at server data
- Ensure that your virtualization works fine by analyzing virtual machine metrics
- Optimize database access with application data
- Analyze the network impact of database communication with network data
Server data tells about your hosts’ health
By checking CPU, memory, and disk space metrics you make sure your MySQL processes have sufficient resources available.
- CPU - MySQL will deliver better performance on faster CPUs. When monitoring virtual machines, also monitor the virtual host that the machines run on. Numbers like CPU ready time are of particular importance.
- Page faults per seconds - Having thousands of page faults per second indicates that your hosts are out of memory.
- Disk space - For an optimal MySQL performance make sure you have lots of disk space available on your hard drive.
Know which commands affect database performance
Knowing which services access your MySQL is vital for finding database performance bottlenecks. If there is a single service that’s suffering from bad database response times, dig deeper into that service’s metrics to find out what’s causing the problem.
Take a deeper look into the service’s communication with the database and find out which commands affect the database performance the most.
Tuning your MySQL performance with Dynatrace
Dynatrace monitors and analyzes the activity of your MySQL databases across all platforms, providing visibility down to individual database statements.
- Auto-detect your MySQL databases
- Visualize how apps use your database
- See detailed metrics for every single database statement
- Directly relate MySQL performance metrics to queries