On this page

Show all

High CPU Usage of RDS for MySQL Instances

Updated on 2025-03-19 GMT+08:00

If the CPU usage of your RDS for MySQL instance is high or close to 100%, database performance deteriorates. For example, data read/write becomes slow, connecting to the instance takes a longer time, or errors are reported when you are trying to delete data.

Solution 1

Analyze slow SQL logs and CPU usage to locate slow queries and then optimize them.

  1. View the slow SQL logs to check for slowly executed SQL queries and view their performance characteristics (if any) to locate the cause.
  2. View the CPU usage metric of your DB instance.
  3. Create read replicas to reduce read pressure on primary DB instances.
  4. Add indexes for associated fields in multi-table association queries.
  5. Do not use the SELECT statement to scan all tables. You can specify fields or add the WHERE condition.

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback