4

I read the documentation regarding t2 and t3 instance but the conditions on which the boost will occur seem blurry to me, i.e., when will the machine be boosted to 20% of the CPU, when will it be scaled down? how much time does it take to boost? can we control the boosting parameters/conditions? Feel free to share you experience with the t2/t3 unlimited feature.

MLu
  • 23,798
  • 5
  • 54
  • 81
OAH
  • 195
  • 1
  • 1
  • 5
  • 1
    See https://serverfault.com/questions/611192/what-constitutes-idle-cpu-during-t2-cpu-credit-calculation – Dan Pritts Oct 26 '18 at 20:30
  • 1
    Possible duplicate of [What constitutes "idle" CPU during T2 CPU credit calculation?](https://serverfault.com/questions/611192/what-constitutes-idle-cpu-during-t2-cpu-credit-calculation) – Dan Pritts Oct 26 '18 at 20:35
  • 1
    A read of the [AWS T3 documentation](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/burstable-performance-instances.html) should answer all your questions. You don't get "boosted", you use the CPU you need which uses up CPU credits. At some point you start paying for CPU if you run out of credits, if you turn on the unlimited feature. – Tim Oct 26 '18 at 23:06

1 Answers1

10

CPU Credits

There a few key concepts to understand:

  1. Each instance continuously earns CPU credits at a constant rate.
  2. When the CPU runs (as in not being idle) it spends credits.

Credits are accounted with millisecond precision - if you burst CPU usage for a fraction of a second you'll spend a fraction of a credit.

There is also a concept of baseline performance:

  • Below baseline performance the instance spends less credits than it earns so the credit balance keeps going up.
  • Above baseline it spends more then it earns and eventually will run out of credits in which case it will be restricted to the baseline performance (because there it earns and spends at the same rate).

The instance will run fast for as long as it's got credits available - i.e. to answer your question: it doesn't take any time to boost. If you've got credits you can run fast.

To get the most benefits AWS recommends to use AMIs with the appropriate virtualisation drivers that advise the host when the instance has nothing to do. Most HVM AMIs should do.

For more info have a look here: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/burstable-credits-baseline-concepts.html - it provides a very good explanation.

T2/T3 Unlimited

Sometimes you need a fast processing for a period of time that's longer than your CPU Credit balance allows but still relatively short and bursty, so it doesn't warrant using e.g. M4/M5 instead.

For example a source code building instance - runs only a few times per day but may be running for an hour at a time. You don't want to run out of credits and slow down the build half way through, but you also don't want to pay for M4/M5 that will be sitting idle most of the time.

That's where T2/T3 Unlimited comes in - it gives you the benefits of a cheaper price comparing to M4/M5 when idle but can run just as fast.

Again the same two concepts of earning and spending as described above apply, however when you spend all your earned credits instead of slowing down AWS starts charging you for the credits needed to run your instance at full speed, if you don't have any earned ones.

Be aware though that running Unlimited instance at full speed for a long period will be more expensive than using M5. But for some workloads it's a perfect fit.

Hope that helps :)

MLu
  • 23,798
  • 5
  • 54
  • 81