Updated on 2022-11-15 GMT+08:00

High CPU Usage of RDS for SQL Server Instances

If the CPU usage is high or close to 100% when you use RDS for SQL Server, data read/write processing and network connection will slow down, and errors will be reported during deletion, affecting your services.

Solution

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

  1. View the slow SQL logs to check for slowly executed SQL queries and view their performance characteristics (if any) to locate the cause.

    For details on viewing RDS for SQL Server logs, see Viewing and Downloading Slow Query Logs.

  2. View the CPU usage of your RDS instance to facilitate problem locating.

    For details about supported monitoring metrics, see Configuring Displayed Metrics.

  3. Create read replicas to offload read pressure from the primary DB instance.
  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.