We have Aurora MySQL serverless DB with 2 capacity units. I didn't understand why the CPU utilisation is always above 10 even when it not processing any queries. As a result we are paying more bills without any use. Can someone help me to understand how the CPU utilisation is calculated and why serveless is charging even when it is in ideal state(not serving any requests).
-
Have you reached out to amazon support? They tend to be very responsive to questions.– Joe WApr 9, 2019 at 12:41
-
Additional information request. Post on pastebin.com and share the links. RAM size of your MySQL Host server A) complete (not edited) my.cnf or my.ini Text results of: B) SHOW GLOBAL STATUS; after minimum 24 hours UPTIME C) SHOW GLOBAL VARIABLES; D) SHOW FULL PROCESSLIST; E) complete MySQLTuner report AND Optional very helpful information, if available includes - htop OR top OR mytop for most active apps, ulimit -a for a linux/unix list of limits, iostat -xm 5 3 for IOPS by device and core/cpu count, for server Parameters group tuning suggestions after analysis.– Wilson HauckApr 11, 2019 at 16:33
-
Is that 10% of one CPU? Or what?– Rick JamesApr 22, 2019 at 17:55
-
The fact that that graph never drops below "10" is very suspicious. Any 'normal' background processing would show some fluctuation.– Rick JamesApr 22, 2019 at 17:56
2 Answers
Run show processlist or an analogous command. 10% doesn't seem unreasonable but the database is obviously doing something at this time.
It seems as though this product puts a large emphasis on replication and durability. From the product description, "Amazon Aurora is designed to offer greater than 99.99% availability, replicating 6 copies of your data across 3 Availability Zones and backing up your data continuously to Amazon S3" https://aws.amazon.com/rds/aurora/
What I'm getting at is that 10% cpu usage could likely be the result of synchronization/replication thread(s).
-
2I think the "6 copies" is mostly handled at the disk layer, not impacting the CPU much. Replication has very little CPU impact if not doing any writes. Still, there could be a lot of monitoring, etc. OTOH, I think 10% is sloppily high. Apr 22, 2019 at 17:54
To expand on @MarCPlusPlus's answer, this is almost certainly due to data replication processes. If you enable the MySQL general_log (which you can do via RDS parameter groups), you can see for yourself that Aurora is constantly executing 2-5 INSERTS per second into system tables (ie, mysql.rds_heartbeat). A quick Google search indicates that this is related to data replication.