PMM in the Data Guardian Toolbox

Database performance is one of the primary responsibilities of database administrators.

Unfortunately, many are flying blind and have no idea how the database is really performing.

It’s time to talk about another tool in the Data Guardian Toolbox.

That tool is Percona’s Performance Monitoring and Management, or PMM.

The importance of visibility

Often, solutions to poorly performing databases involve adding more resources until the problem goes away.

The problem is this is short-term relief. Eventually the problems will come back.

It’s also very costly.

What if you could improve the usage of the existing resources?

Or rewrite queries to not use so many resources?

The real solution is to have a system that collects performance information over time.

Then a database administrator can go in and review what the database is actually doing.

And they can get a sense of the patterns of the performance.

Knowing these patterns is important to be able to spot anomalies.

Anomalies can come due to hardware degrading, disks failing, or new code releases.

But without visibility, one would never know until it was too late and users were impacted.

PMM overview

If you do not already have a visibility tool for the database, you have several options.

Your organization might have a standard tool for other systems. In this case, you can spend time getting the database hooked up there.

Or you can purchase a SaaS product that specializes in your database of choice.

The benefit of PMM is that it’s easy to set up, and it’s open source.

This translates into a low barrier of entry!

You can quickly start collecting data such as MySQL InnoDB metrics.

Image captured from the PMM Demo of MySQL InnoDB metrics
InnoDB Dashboard from PMM Demo

Or Mongo’s WiredTiger performance.


It comes pre-packaged with dashboards that let you focus on identifying bottlenecks and inefficiencies.

It even comes with a query analyzer feature that allows you to get a sense of the actual workload impacting database performance.

Image captured from the PMM Demo of MySQL Query Analyzer, or QAN
Query Analyzer (QAN) from PMM Demo

PMM Architecture

The architecture of PMM is relatively simple.

PMM Architecture Diagram
PMM Architecture Diagram

You basically have a server to receive the queries and metrics.

And then you install the client on each server you want to monitor.

If you are monitoring a DBaaS such as RDS, you can install the client on a server that has connectivity to that instance.

The client can be configured to run the various agents that collect the data.

These agents are called exporters.

Out of the box, PMM has agents for MySQL, Postgres, Mongo for both metrics and queries amongst others that are officially supported by Percona.

And there are other third party exporters that have been developed as well.

That’s the beauty of open source!

Conclusion

Having visibility into the performance of your database over time is critical.

Without this visibility, you cannot get out of reactive mode when it comes to database performance.

PMM is a great tool to provide that visibility, with a very low amount of friction to getting it going.

There are other tools out there, though. Some might already be used in your organization.

The important thing is that you get going collecting this data so you can make informed decisions for improvements before they become a crisis.