2

We have a MySQL RDS instance which is still utilizing ~50% CPU after stopping our applications and terminating all connections (e.g. from MySQL workbench).

The mysql-error-running.log is showing:

2017-08-03T11:24:05.711179Z 0 [Note] InnoDB: page_cleaner: 1000ms intended loop took 4813ms. The settings might not be optimal. (flushed=5623 and evicted=0, during the time.)
2017-08-03T11:26:11.415416Z 0 [Note] InnoDB: page_cleaner: 1000ms intended loop took 11095ms. The settings might not be optimal. (flushed=11538 and evicted=0, during the time.)
2017-08-03T11:33:07.901110Z 0 [Note] InnoDB: page_cleaner: 1000ms intended loop took 15667ms. The settings might not be optimal. (flushed=15298 and evicted=0, during the time.)
2017-08-03T11:33:29.458855Z 0 [Note] InnoDB: page_cleaner: 1000ms intended loop took 5004ms. The settings might not be optimal. (flushed=4931 and evicted=0, during the time.)

Can anyone advise on what is causing the persistent CPU usage here? Our applications have been disconnected from the RDS for over 40 minutes and CPU is still averaging 50% usage.

show process list is empty (aside from the connections used when connecting via MySQL workbench)

UPDATE: the RDS was rebooted and CPU dropped back down to expected levels.

1

A possible reason:

The "Change buffer" queues up index changes for eventual writing to disk. If you did a lot of INSERTs/UPDATEs/DELETEs on table(s) with non-unique indexes, the CPU could have been busy for some time after the queries "finished".

The reboot may have only coincidentally cleared up the CPU. The change-buffer work must be done eventually, even after a reboot.

  • Thanks for the suggestion. Looking at the cloud watch metrics, the CPU utilisation never returned to 50% following the reboot. It stays consistently around 11% (with the apps connected). The two major tables that are updated both have unique indexes. – Andy Longwill Aug 15 '17 at 13:09
  • UNIQUE indexes must be checked during the INSERTs/UPDATEs/DELETEs. So the 'delayed' action of the Change Buffer is not relevant. – Rick James Aug 15 '17 at 21:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.