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
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.
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.
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
Can't Load PhpMyadmin On After Server Update
Redirect www to non-www in Apache Conf
How To Check If Your SSL Cert Is SHA 1
Windows TrackPad Gestures