# Application performance decrease pmm2 and MySQL 5.5

**URL:** <https://forums.percona.com/t/application-performance-decrease-pmm2-and-mysql-5-5/25619>\
**Category:** PMM 2.x\
**Tags:** mysql\
**Created:** [October 3, 2023, 9:23am UTC](https://forums.percona.com/t/application-performance-decrease-pmm2-and-mysql-5-5/25619 "2023-10-03T09:23:55Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![greg\_Atos](https://avatars.discourse-cdn.com/v4/letter/g/ec9cab/32.png) [@greg\_Atos](https://forums.percona.com/u/greg_Atos)\
**Post date:** [October 3, 2023, 9:23am UTC](https://forums.percona.com/t/application-performance-decrease-pmm2-and-mysql-5-5/25619/1 "2023-10-03T09:23:55Z")

</div>

Hi everyone,

## Description:

When we installed and started up pmm-agent (2.12, on Centos6 server and MySQL 5.5), we had a performance decrease on our applications. Exemple, a dedicated thread on our mySQL instance take time 50ms but with pmm activated, it take time 800ms ? It was a big problem for us, so we stopped pmm-agent and so, no more performance problem.  
Nota : slow\_query AND performance\_schema are on.

## Version:

pmm2 : 2.12  
pmm2-server : 2.37  
MySQL client : 5.5.62  
Server OS client Centos 6  
Server OS pmm : Centos 7

Can you help us ?  
Thanks a lot.  
Greg

---

<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:** [October 3, 2023, 12:06pm UTC](https://forums.percona.com/t/application-performance-decrease-pmm2-and-mysql-5-5/25619/2 "2023-10-03T12:06:57Z")

</div>

Hello @greg_Atos,  
Can you check if innodb\_stats\_on\_metadata is ON or OFF? If ON, this is most likely the source of the performance problem as PMM collects much metatdata every second. When ON, this causes index statistics to be recalculated each time. If it is ON, you are perfectly safe to set this OFF as OFF became the default in 5.6+

---

<div class="post-metadata">

**Author:** ![greg\_Atos](https://avatars.discourse-cdn.com/v4/letter/g/ec9cab/32.png) [@greg\_Atos](https://forums.percona.com/u/greg_Atos)\
**Post date:** [October 3, 2023, 12:27pm UTC](https://forums.percona.com/t/application-performance-decrease-pmm2-and-mysql-5-5/25619/3 "2023-10-03T12:27:26Z")

</div>

Hello @matthewb ,  
Yes, innodb\_stats\_on\_metadata is ON. We can’t right now set as OFF because it’s a production server but we will try it in two days.  
Do you know if we can see the impact of this option ? Before AND after ? On Percona graph ? or other tool ?  
Thanks a lot for your help,  
Greg

---

<div class="post-metadata">

**Author:** ![greg\_Atos](https://avatars.discourse-cdn.com/v4/letter/g/ec9cab/32.png) [@greg\_Atos](https://forums.percona.com/u/greg_Atos)\
**Post date:** [October 3, 2023, 12:48pm UTC](https://forums.percona.com/t/application-performance-decrease-pmm2-and-mysql-5-5/25619/4 "2023-10-03T12:48:34Z")

</div>

> [@greg\_Atos](#):
>
> innodb\_stats\_on\_metadata

I found this page :  
[innodb\_stats\_on\_metadata and slow queries on INFORMATION\_SCHEMA (percona.com)](https://www.percona.com/blog/innodb_stats_on_metadata-slow-queries-information_schema/)

---

<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:** [October 3, 2023, 1:50pm UTC](https://forums.percona.com/t/application-performance-decrease-pmm2-and-mysql-5-5/25619/5 "2023-10-03T13:50:10Z")

</div>

Yes, as you can see that blog is from 2013!! innodb\_stats\_on\_metadata is very well known in the MySQL community for being a performance killer. You should turn this off as soon as you can. You should try `SET GLOBAL innodb_stats_on_metadata=OFF` I don’t recall if it is dynamic, or requires restart.

The impact you will see will actually be a performance GAIN! Your queries should execute faster, and less CPU will be used.

And I have to say that MySQL 5.5 has been completely dead for almost 7 years. 5.6 is also dead and 5.7 will be dead at the end of October. You should make every effort to upgrade ASAP.

---

<div class="post-metadata">

**Author:** ![greg\_Atos](https://avatars.discourse-cdn.com/v4/letter/g/ec9cab/32.png) [@greg\_Atos](https://forums.percona.com/u/greg_Atos)\
**Post date:** [October 3, 2023, 1:53pm UTC](https://forums.percona.com/t/application-performance-decrease-pmm2-and-mysql-5-5/25619/6 "2023-10-03T13:53:01Z")

</div>

@matthewb , yes I know but I’ worked in a very secure client context and I can’t upgrade right now.  
When you set global variables, it’s dynamics 🙂  
Thanks again !!!
