Amazon RDS 奇怪指标 CPU 信用余额

Amazon RDS Strange metrics CPU Credit Balance

我们有 db.t2.small 类型的 RDS PostgreSQL 实例。我们在 cpu 信用余额指标方面遇到了一些奇怪的时刻。 CPU 信用使用量没有增长,但余额已降至零。任何人都知道什么可能是问题? (RDS 实例工作正常,没有任何问题)。

根据文档,CPU 积分似乎会在获得 24 小时后过期。

CPUCreditUsage

[T2 instances] The number of CPU credits consumed by the instance. One CPU credit equals one vCPU running at 100% utilization for one minute or an equivalent combination of vCPUs, utilization, and time (for example, one vCPU running at 50% utilization for two minutes or two vCPUs running at 25% utilization for two minutes).

CPU credit metrics are available only at a 5 minute frequency. If you specify a period greater than five minutes, use the Sum statistic instead of the Average statistic.

Units: Count

CPUCreditBalance

[T2 instances] The number of CPU credits available for the instance to burst beyond its base CPU utilization. Credits are stored in the credit balance after they are earned and removed from the credit balance after they expire. Credits expire 24 hours after they are earned.

CPU credit metrics are available only at a 5 minute frequency.

Units: Count

https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/rds-metricscollected.html

我发现我的 T2-micro 免费层级 RDS 实例有同样的行为。我现在的假设是,服务 window 是在实例重新启动或热插拔时发生的,从而导致新实例具有默认基线信用数。这使得周六晚上比周日晚上更有吸引力,以确保在下一个工作日之前重新积累积分。