Why is my AWS Aurora MySQL experiencing high CPU usage and slow queries?

0
11
Asked By DataDynamo42 On

I'm dealing with an issue on my AWS Aurora MySQL 8.0 (R6g.XL instance) where the CPU spikes to around 95% during specific times (like 8 AM UTC). This spike affects query performance, as I've noticed some queries that run fine at other times become slow. According to the performance insights metrics, the high CPU usage is primarily shown under 'os.cpuutilization.nice.avg' which seems strange. I checked for any active backups or maintenance jobs during the same time, but none were found. Could there be other maintenance processes causing this issue, or is it possibly user queries? It confuses me why 'os.cpuutilization.nice.avg' is spiking instead of 'os.cpuutilization.user.avg.' How can I effectively debug and resolve this?

3 Answers

Answered By DevOpsGuru2 On

You might want to check your logs too. Although you mentioned that you couldn’t catch the processlist because the spike happens in short bursts, you can examine the exported logs to see what queries are being executed around those times. They might give you clues about what's causing the high resource usage.

Answered By QueryWhisperer99 On

If you have an APM tool like NewRelic or DataDog, you could use that to dig deeper. Also, check your performance insights closely. Sometimes, a temporary table creation or sorting can trigger CPU spikes and may not show under avg.user. Running `SHOW PROCESSLIST;` during these spikes can provide insights into what might be running.

Answered By CloudNinja88 On

It seems like the issue might be rooted in the database backend rather than being caused by a specific query. One suggestion is to enable enhanced monitoring to identify which processes are consuming the most resources during the spike.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.