2

Our T2.small EC2 instance continues to do its usual 10-15% usage but the CPU credit balance has gone up to maximum and stayed there:

enter image description here I have contacted AWS support but they just send me a link explaining how credit balance works. I know that this isn't technically a "problem" for us, but this is our important Production Server and it makes me a bit nervous. Has anyone had an issue like this with an EC2 instance?

  • 1
    That's a good thing and what you should expect to happen at 10-15% usage. – ceejayoz Nov 16 '17 at 16:31
  • (Per the docs, a t2.small gets enough credits to sustain 20% CPU load.) – ceejayoz Nov 16 '17 at 16:38
  • The AWS documentation is excellent. I suggest you read the material AWS support sent to you carefully. – Tim Nov 16 '17 at 18:09
  • 3
    I suggest you guys read the docs carefully too. A 10-15% Server load does not get you a constantly maxed out CPU credit balance. You have an overall positive credit balance, but not 3 consecutive days of 288 credits (the maximum for a T2.small instance). There are times in the last day where CPU usage has popped over 1 (1.25, 1.5) and still the CPU credit usage is stuck at 288 credits. This isn't right. – Duncan Edwards Nov 16 '17 at 20:15
  • @Duncan. Good catch. I agree with you that something is wrong. Maybe in a positive way for the customer, I am not sure. I would test by creating a CPU load on the server for 10 minutes and then review the credit balance. – John Hanley Nov 16 '17 at 20:24
4

UPDATED ANSWER: From https://forums.aws.amazon.com/ann.jspa?annID=5196 -

Previously, earned CPU Credits had a 24-hour expiry period. Now, earned CPU Credits do not expire until the instance is terminated or stopped.

1

A t2.small instance type can use 20% CPU before it starts using CPU credits.

Your CPU is only using between 10% and 15%. Thus, you're collecting CPU credits faster than you're using them. Your credits will continue to rise until it hits the maximum, where it just stays.

To lower your CPU credit balance, start using more than 20% of your CPU.

You don't have a problem.

However, you could investigate to see if a t2.micro may work for your use case.

Source: http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/t2-instances.html#t2-instances-cpu-credits

  • 1
    But the CPU Credit Balance is exactly the maximum. Constantly. Exactly. There are 2 things I am confused with: 1) The algorithm for counting credits hasn't change, and neither has my CPU usage, why are credits maxing out at 288 when nothing has changed? Has the CPU credit algorithm changed? 2) There are plent of 5 minute blocks where the CPU usage IS over 20%. So why has the CPU credit algorithm remained at maximum? I mean, it hasn't even dropped a single point. – Duncan Edwards Nov 16 '17 at 18:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.