# Innodb Main thread utilization parameter

**URL:** <https://forums.percona.com/t/innodb-main-thread-utilization-parameter/25898>\
**Category:** Database Monitoring and Management\
**Tags:** mysql, percona\
**Created:** [October 13, 2023, 1:33pm UTC](https://forums.percona.com/t/innodb-main-thread-utilization-parameter/25898 "2023-10-13T13:33:01Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nanuka](https://avatars.discourse-cdn.com/v4/letter/n/9fc29f/32.png) [@Nanuka](https://forums.percona.com/u/Nanuka)\
**Post date:** [October 13, 2023, 1:33pm UTC](https://forums.percona.com/t/innodb-main-thread-utilization-parameter/25898/1 "2023-10-13T13:33:01Z")

</div>

Hi, last period I am seeing this pic on pmm, I can not find enough information about Innodb Main thread utilization parameter`, This may be actual trigger for the IO problems what I have expirienced on my pxc cluster . Could you please give some information about this parameter?

 ![Screenshot 2023-10-13 at 17.30.17](https://us1.discourse-cdn.com/flex019/uploads/percona1/original/2X/e/e770b3ab97b09f698652c6b9a6f678f8525ad8e7.jpeg)

---

<div class="post-metadata">

**Author:** ![Yunus](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/yunus/32/6430_2.png) [@Yunus](https://forums.percona.com/u/Yunus)\
**Post date:** [October 17, 2023, 3:47pm UTC](https://forums.percona.com/t/innodb-main-thread-utilization-parameter/25898/2 "2023-10-17T15:47:15Z")

</div>

How does “Innodb log file Usage Hourly” graph look to you?  
Can you share it?

---

<div class="post-metadata">

**Author:** ![Nanuka](https://avatars.discourse-cdn.com/v4/letter/n/9fc29f/32.png) [@Nanuka](https://forums.percona.com/u/Nanuka)\
**Post date:** [October 18, 2023, 6:24am UTC](https://forums.percona.com/t/innodb-main-thread-utilization-parameter/25898/3 "2023-10-18T06:24:15Z")

</div>

![Screenshot 2023-10-18 at 10.18.59](https://us1.discourse-cdn.com/flex019/uploads/percona1/original/2X/e/e4d7724a26f16afe9e0a71184fd5bae5d64a9598.png)  
@Yunus Here you can see

---

<div class="post-metadata">

**Author:** ![yunus\_shaikh](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/yunus_shaikh/32/3512_2.png) [@yunus\_shaikh](https://forums.percona.com/u/yunus_shaikh)\
**Post date:** [October 18, 2023, 6:42am UTC](https://forums.percona.com/t/innodb-main-thread-utilization-parameter/25898/4 "2023-10-18T06:42:54Z")

</div>

Ok so this seems good at the moment.  
But the thing is that it shows only for last 24 hours.  
So it is possible that it might have went higher with flushing activity during the time you noticed log flushing activity higher in the misc graph.  
Was there a high load during the time when you saw spike?

---

<div class="post-metadata">

**Author:** ![Nanuka](https://avatars.discourse-cdn.com/v4/letter/n/9fc29f/32.png) [@Nanuka](https://forums.percona.com/u/Nanuka)\
**Post date:** [October 18, 2023, 6:58am UTC](https://forums.percona.com/t/innodb-main-thread-utilization-parameter/25898/5 "2023-10-18T06:58:59Z")

</div>

@Yunus When I saw the spike on main thread utilization graph, log file usage history graph was okay. Here you can see the same timeslot but the spike on utilization

 ![Screenshot 2023-10-18 at 10.18.30](https://us1.discourse-cdn.com/flex019/uploads/percona1/original/2X/d/def1e4689e07e3369146c298716a37b3d974d3c1.png)

Also in the error log I have this on exact sam time (the server is utc)  
`2023-09-23T15:29:43.217502Z 0 [Note] InnoDB: page_cleaner: 1000ms intended loop took 7609ms. The settings might not be optimal. (flushed=2592, during the time.)`

 ![Screenshot 2023-10-18 at 11.10.52](https://us1.discourse-cdn.com/flex019/uploads/percona1/original/2X/4/4d3848a58cbe0ab7cc0928f7c7511a8cbc39b0a8.png)

---

<div class="post-metadata">

**Author:** ![yunus\_shaikh](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/yunus_shaikh/32/3512_2.png) [@yunus\_shaikh](https://forums.percona.com/u/yunus_shaikh)\
**Post date:** [October 18, 2023, 7:23am UTC](https://forums.percona.com/t/innodb-main-thread-utilization-parameter/25898/6 "2023-10-18T07:23:08Z")

</div>

> [@Nanuka](#):
>
> When I saw the spike on main thread utilization graph, log file usage history graph was okay. Here you can see the same timeslot but the spike on utilization

Innodb log file usage hourly is actually recorded for only last 24 hours. So you cannot see it for 23rd of September now. Even if you change the timings it will only show for last 24 hours.

 ![image](https://us1.discourse-cdn.com/flex019/uploads/percona1/original/2X/7/7f9dd40f3697a1a423eedfc053ba3c37cb3fa056.png)

> [@Nanuka](#):
>
> 2023-09-23T15:29:43.217502Z 0 [Note] InnoDB: page\_cleaner: 1000ms intended loop took 7609ms. The settings might not be optimal. (flushed=2592, during the time

Related to this message,  
Once per second, the page cleaner scans the buffer pool for dirty pages to flush from the buffer pool to the disk. The warning you saw shows that it has lots of dirty pages to flush, and it takes over 4 seconds to flush a batch of them to disk when it should complete that work in under 1 second

This triggers the PageCleaner to act and clear dirty pages. Since there were too many dirty pages than usual, it took more time for the PageCleaner to clear the buffer.

`innodb_lru_scan_depth` particular variable that controls how much of the buffer pool scanning should be done for clearing. This might either be a large value or the write throughput of the system is really high causing a large number of dirty pages.

You might want to check this variable and experiment with it if you face this too often.

---

<div class="post-metadata">

**Author:** ![Nanuka](https://avatars.discourse-cdn.com/v4/letter/n/9fc29f/32.png) [@Nanuka](https://forums.percona.com/u/Nanuka)\
**Post date:** [October 25, 2023, 7:08am UTC](https://forums.percona.com/t/innodb-main-thread-utilization-parameter/25898/7 "2023-10-25T07:08:52Z")

</div>

@yunus_shaikh When I have last incident and investigate graphs during ongoing problem Innodb log file Usage Hourly graph was totally fine, so I can not relate Innodb Main thread utilization spike to this . Can you suggest where to find information about Innodb Main thread utilization parameter as I can not find it in official documentation .

 ![Screenshot 2023-10-25 at 11.24.05](https://us1.discourse-cdn.com/flex019/uploads/percona1/original/2X/4/4565c9724e86b96891faf21fda1e4660cf1fa71b.png)

This is the only info which can be seen

> ## InnoDB Misc[¶](https://docs.percona.com/percona-monitoring-and-management/details/dashboards/dashboard-mysql-innodb-details.html#innodb-misc)
> 
> ### InnoDB Main Thread Utilization[¶](https://docs.percona.com/percona-monitoring-and-management/details/dashboards/dashboard-mysql-innodb-details.html#innodb-main-thread-utilization)
> 
> The InnoDB Main Thread Utilization graph shows the portion of time the InnoDB main thread spent at various task.
