RDS SQL Server Standard - Recurring CPU Utilization Spikes

0

I'm experiencing recurring spikes in CPU utilization on my RDS SQL Server Standard edition. Every day at:

8:00 AM UTC: CPU utilization jumps to 90-95%. 11:00 AM UTC: CPU utilization rises to 40-50%. The rest of the day, CPU utilization remains between 0-10%.

These spikes are concerning because they might impact database performance during these times. I suspect scheduled ETL tasks are the culprit, but I'd like some help with:

Identifying the Specific Queries: What are the best methods to pinpoint the exact queries or stored procedures causing these spikes (beyond just knowing it's ETL)? Optimizing ETL Processes: Once identified, what are some recommended approaches to optimize these ETL tasks and minimize their CPU impact? Additional Info:

I've been looking at SQL Server Profiler and CloudWatch Performance Insights, but I'd like to hear advice from experienced specialists. Any insights or suggestions would be greatly appreciated!

Additional Information: RDS Instance Class: (db.r5d.large) SQL Server Version: (SQL Server 2019 Standard Edition)

1 Answer
0

Hi, did you get any query information from performance insight or profile on queries running on particular times? Look like some scheduled tasks are running which cause the CPU spike.

I am sharing some common reasons for RDS SQL server CPU spike.

  1. Query Inefficiency: Poorly optimized or resource-intensive queries can place a heavy load on the CPU. Addressing this issue may involve adding indexes, rewriting queries, or utilizing query hints.
  2. High Concurrency: Multiple concurrent connections and queries executing simultaneously can strain the CPU resources. Optimizing connection pooling and scaling up the instance size may be required to handle high concurrency scenarios.
  3. Database Maintenance Tasks: Operations like index rebuilds, database consistency checks (DBCC), or statistics updates can be CPU-intensive, especially for large databases. Scheduling these tasks during off-peak hours and monitoring their impact is recommended.
  4. Memory Constraints: Insufficient memory allocation can force the SQL Server to rely more heavily on disk operations, leading to increased CPU usage. Ensuring adequate memory allocation for the SQL Server instance is crucial.
  5. Blocking and Deadlocks: Frequent blocking or deadlock situations, often caused by inefficient application design or queries, can result in CPU spikes as the SQL Server attempts to resolve these issues. Addressing blocking and deadlocks through application design improvements or query optimization is advisable.
  6. Inadequate Instance Size: If the chosen instance type lacks sufficient CPU resources to handle the workload, CPU spikes may occur. Scaling up to a larger instance type with more CPU resources may be necessary.
  7. Code-related Issues: Poorly written application code or inefficient database design can contribute to CPU spikes, as the SQL Server may need to compensate for these issues, leading to increased CPU usage.

To troubleshoot and mitigate CPU spikes, below tools can be leveraged.

CloudWatch matrices, Performance Insight, Enhanced monitoring & SQL Server native tools

You can refer to AWS Article on How do I troubleshoot high CPU utilization on my RDS for SQL Server instance for more details, also you can reach out to AWS support to get more information.

profile pictureAWS
EXPERT
answered 10 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions