Skip to content

High CPU Usage on an Idle MSSQL RDS database

0

I've just created a SQL Server Express Edition on the free tier, so using db.t3.micro. When there are no connections or queries running it sits at 32% CPU usage. This has caused it to go through the burst allowance and now I'm being charged a couple of dollars a day for an idle database. This doesn't seem right, but it maybe the MS SQL databases use a high CPU at idle so I might have to switch it off. Is there anything else I can do to stop being charged as its just a dev project at the moment.

2 Answers
0

The situation you're experiencing with high CPU usage on an idle SQL Server Express Edition RDS instance (db.t3.micro) is not uncommon, and there are a few factors to consider:

  1. T3 instance behavior: The db.t3.micro instance type is a burstable performance instance. It has a baseline CPU performance of 10%, and when it exceeds this, it starts consuming CPU credits. Once these credits are exhausted, you start incurring additional charges for CPU usage above the baseline.

  2. SQL Server resource requirements: Even when idle, SQL Server can consume a significant amount of CPU resources due to background processes, memory management, and other system tasks. The t3.micro instance may be barely meeting the minimum hardware requirements for SQL Server, leading to higher than expected CPU usage.

  3. Free Tier limitations: While there is a free tier offer for RDS SQL Server, it's important to note that it's specifically for db.t2.micro instances running SQL Server Express Edition. The t3.micro instances are not covered under this free tier offer.

To address this issue and avoid charges, you have a few options:

  1. Switch to MySQL or another database engine that has lower resource requirements and may stay within the free tier limits more easily.

  2. If possible, stop the database instance when not in use to avoid incurring charges.

  3. Consider using a non-burstable instance type, although this may increase your base costs.

  4. Investigate if there are any specific SQL Server configurations or settings that can be optimized to reduce CPU usage, such as limiting background processes or adjusting memory allocation.

  5. Monitor the database using Amazon CloudWatch or Performance Insights to identify any specific processes or queries that might be causing unexpected CPU usage, even when the database appears idle.

Unfortunately, running SQL Server on a t3.micro instance may inherently lead to higher CPU usage and potential charges beyond the free tier. For development purposes, you might want to consider alternative database engines or instance types that better fit within the free tier constraints.
Sources
Amazon RDS Instance Using 25~35% CPU While Completely Idle (Zero Sessions, Zero Queries) | AWS re:Post
per vCPU-Hour of T3 CPU Credits | AWS re:Post
Recommended alarms - Amazon CloudWatch

answered a year ago
AWS
EXPERT
reviewed a year ago
0

Please note that a db.t3.micro instance has a performance that barely meets the hardware requirements of SQL Server (https://learn.microsoft.com/en-us/sql/sql-server/install/hardware-and-software-requirements-for-installing-sql-server-2019?view=sql-server-ver16) Therefore, just running SQL Server may consume a certain amount of CPU usage.

You may also be able to learn something by enabling Performance Insights or Enhanced Monitoring (https://repost.aws/ja/knowledge-center/rds-sql-server-resolve-high-cpu-use)

AWS
EXPERT
answered a year ago
EXPERT
reviewed a year 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.