Brian
Brian

Reputation: 13571

AWS RDS CPU credit balance doesn't increase even though CPU credit usage is low

I have an AWS RDS MySQL db.t3.medium read replica whose CPU credit balance remains at 0 for a whole day even though its CPU credit usages are below 1 recently.

enter image description here

Why does this happen?

This document says that a t3.medium instance can earn 24 credits per hour. This makes me think that the CPU credit balance only goes down when CPU credit usage is above 24 per hour.

Does anyone have ideas about why this happen?

The replica lag of this instance is almost 0, which appears to be functioning normally.

enter image description here

One thing that I find strange is that the swap usage of the MySQL instance is high (467MB).

enter image description here

I think this might be relative to why the CPU credit balance doesn't increase.

But I still have no clue about why the swap usage is high.

Here's the output of running SHOW PROCESSLIST; in the database.

enter image description here

The CPU utilization is also pretty low. I really have no idea why the CPU credit balance stuck at 0.

enter image description here

Upvotes: 3

Views: 1067

Answers (1)

Brian
Brian

Reputation: 13571

According to this document, db.t3.medium's default mode is Unlimited mode. In this mode, if the RDS instance bursts above baseline CPU utilization, then the RDS first uses the accrued credits to burst. If there are no accrued credits remaining, then the instance spends surplus credits to burst.

So when we look at CPUSurplusCreditBalance metric, we can find the that this metric goes up when CPUCreditBalance goes to zero and the RDS instance bursts above baseline CPU utilization.

In simpler terms, you may think that t3 instances' CPUCreditBalance can go 'negative' if they need to.

enter image description here

Upvotes: 1

Related Questions