# Percona monitoring management tool question

**URL:** <https://forums.percona.com/t/percona-monitoring-management-tool-question/10145>\
**Category:** Database Monitoring and Management\
**Tags:** mysql\
**Created:** [April 18, 2021, 7:34pm UTC](https://forums.percona.com/t/percona-monitoring-management-tool-question/10145 "2021-04-18T19:34:13Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![soumyaukil](https://avatars.discourse-cdn.com/v4/letter/s/439d5e/32.png) [@soumyaukil](https://forums.percona.com/u/soumyaukil)\
**Post date:** [April 18, 2021, 7:34pm UTC](https://forums.percona.com/t/percona-monitoring-management-tool-question/10145/1 "2021-04-18T19:34:13Z")

</div>

Hi Team,

I am looking at the percona monitoring management documentation, wherein it has talked about IO analysis for queries. [MySQL Query Performance Troubleshooting: Resource-Based Approach - Percona Database Performance Blog](https://www.percona.com/blog/2020/07/15/mysql-query-performance-troubleshooting-resource-based-approach/). In the document, it is mentioned that “MySQL does not really provide very good instrumentation in those terms, and it is not easy to get information on how much CPU usage, Disk IO, or Memory a given query caused.”

Since I know PMM depends on performance schema in mysql to get stats, I was wondering how we collect query level stats for IO wait metrics. Performance schema has wait related instruments, however it provides aggregated level information. It does not provide metrics for individual query level IO wait. Can you please help me understand how we prepare this data?

Thanks

---

<div class="post-metadata">

**Author:** ![matthewb](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/matthewb/32/34_2.png) [@matthewb](https://forums.percona.com/u/matthewb)\
**Post date:** [April 19, 2021, 3:45pm UTC](https://forums.percona.com/t/percona-monitoring-management-tool-question/10145/2 "2021-04-19T15:45:51Z")

</div>

Hello @soumyaukil,  
PMM collects standard OS metrics by directly querying the kernel/OS. MySQL does not expose CPU/disk metrics of the overall system. This is what the documentation means when it says this is not easy to get. PMM uses two collectors: node\_exporter and mysql\_exporter to gather data about the system (node) and mysql (mysql).

---

<div class="post-metadata">

**Author:** ![soumyaukil](https://avatars.discourse-cdn.com/v4/letter/s/439d5e/32.png) [@soumyaukil](https://forums.percona.com/u/soumyaukil)\
**Post date:** [April 19, 2021, 6:31pm UTC](https://forums.percona.com/t/percona-monitoring-management-tool-question/10145/3 "2021-04-19T18:31:20Z")

</div>

Hi @matthewb,  
Thanks for your answer. I understand that Mysql does not expose CPU/disk metrics of the overall system. However I am confused with this diagram present in this blog [MySQL Query Performance Troubleshooting: Resource-Based Approach - Percona Database Performance Blog](https://www.percona.com/blog/2020/07/15/mysql-query-performance-troubleshooting-resource-based-approach/). If you look at second [screenshot](https://www.percona.com/blog/wp-content/uploads/2020/07/7.png) at **Disk IO Analysi**

 ![image](https://us1.discourse-cdn.com/flex019/uploads/percona1/original/2X/7/7d86283c7e908c6689142e4b7f483e6a5286ca57.jpeg) **s** , it seems like we are trying to capture IO load information for individual query. I have attached the screenshot here as well. If mysql does not provide this IO metrics for each query, then how are we calculating this data for individual query? Please clarify.

---

<div class="post-metadata">

**Author:** ![matthewb](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/matthewb/32/34_2.png) [@matthewb](https://forums.percona.com/u/matthewb)\
**Post date:** [April 19, 2021, 7:28pm UTC](https://forums.percona.com/t/percona-monitoring-management-tool-question/10145/4 "2021-04-19T19:28:10Z")

</div>

I guess I didn’t understand what you were asking about in your original post. The screenshot helps clarify. That information comes directly from the slow query log metrics which are calculated after each query execution. Take a look here: [Slow Query Log](https://www.percona.com/doc/percona-server/5.5/diagnostics/slow_extended_55.html#id1)
