This topic describes how the CPU credits change when the instance is running in different performance modes. After a burst performance instance is created, its CPU credits change according to the relationship between its CPU usage and baseline performance.

Background information

The examples given in this topic are only for your reference. Please understand that these may vary from your actual situation. We recommend that before you continue to read the rest of this topic, make sure that you are familiar with related concepts, including t5 instance type family, CPU credits, baseline performance, performance modes, and instance configuration change.

We also recommend that you are familiar with the following information:

  • Each vCPU is allocated 30 CPU credits every time you create a burstable performance instance, which is called launch CPU credits.
  • The number of CPU credits that a burstable performance instance uses on an hourly basis depends on the number of vCPUs, CPU usage, and running time of the instance. One CPU credit is equal to one vCPU running at full capacity for one minute. Additionally, other combinations of number of vCPUs, CPU usage, and running time can also equate to one CPU credit.
  • An instance that runs at baseline performance earns the same CPU credits as it consumes. For more information, see Earn CPU credits and CPU credit consumption.

Standard mode

In the standard mode, the performance of a burstable performance instance is governed by the CPU credits it has accrued. If the instance has consumed all the accrued credits, it cannot burst above the baseline performance.

This section uses the ecs.t5-lc1m2.large instance for example.
Note The ecs.t5-lc1m2.large instance has the following features:
  • It is configured with 2 vCPUs and 4 GiB memory.
  • It receives 60 launch CPU credits upon creation (30 CPU credits for each vCPU).
  • It has a baseline performance of 10%.
  • It earns 12 CPU credits per hour and accrues a maximum of 288 CPU credits over a 24-hour period. For more information, see t5 instance type family.
  • It consumes 12 CPU credits per hour when running at baseline performance.

The following figure shows how the CPU credits of the ecs.t5-lc1m2.large instance change in the standard mode.



As shown in the preceding figure, CPU credit changes over time with the following distinct phrases:

  • 0–24 hours

    Phase A: The instance earns 60 launch CPU credits after being started. The initial CPU usage is 0% and the CPU credits continue to accrue until they reach the maximum value at hour 24.

    At the end of this phase, the available CPU credits reach 348.

    Available CPU credits (348) = Launch CPU credits (60) + Maximum CPU credit balance (288).

  • 25–48 hours
    1. Phase B: The CPU usage is 10%, which is equal to the baseline performance. Launch CPU credits are preferentially used and will not be recovered after being used up. The instance consumes 12 CPU credits per hour when it starts to run.

      At the end of this phase, the available CPU credits reach 288.

      Available CPU credits (288) = CPU credits at the end of phase A (348) – Launch CPU credits (60).

    2. Phase C: The CPU usage is 5%. Although the CPU usage is lower than the baseline performance, the CPU credit balance has reached the upper limit and remains unchanged.

      At the end of this phase, the CPU credit balance reaches the maximum value 288.

    3. Phase D: The CPU usage is 10%, which is equal to the baseline performance. The instance earns the same CPU credits as it consumes and the CPU credit balance remains unchanged.

      At the end of this phase, the CPU credit balance reaches the maximum value 288.

  • 48–72 hours
    1. Phase E: The instance runs at full capacity for 2 hours and consumes 120 CPU credits per hour. The baseline performance cannot meet requirements, and the instance starts to consume CPU credits accrued in the CPU credit balance.

      At the end of this phase, the CPU credit balance is 72.

      CPU credit balance (72) = Maximum CPU credit balance (288) – 2 × CPU credits consumed per hour (120) + 2 × CPU credits earned per hour (12)

    2. Phase F: The CPU usage is 0%. The instance is idle for 4 hours and earns 12 CPU credits per hour. All of the earned CPU credits are accrued in the CPU credit balance.

      At the end of this phase, the CPU credit balance is 120.

      CPU credit balance (120) = CPU credit balance at the end of phase E (72) + 4 × CPU credits earned per hour (12)

    3. Phase G: The instance runs at 5% CPU usage for 8 hours and consumes 6 CPU credits per hour. The remaining CPU credits are accrued in the CPU credit balance.

      At the end of this phase, the CPU credit balance is 168.

      CPU credit balance (168) = CPU credit balance at the end of phase F (120) – 8 × CPU credits consumed per hour (6) + 8 × CPU credits earned per hour (12)

    4. Phase H: The CPU usage is 80% and the baseline performance cannot meet the requirements. The instance runs for 2 hours and consumes 96 CPU credits per hour. The CPU credit balance is used up and the instance cannot burst above the baseline performance.
      Note If CPU credits are insufficient, performance is gradually lowered to the baseline performance level within 15 minutes, so that the instance does not experience sharp performance drop-off when its CPU credit balance is used up.

      At the end of this phase, the CPU credit balance is 0.

      CPU credit balance (0) = CPU credit balance at the end of phase G (168) – 2 × CPU credits consumed per hour (96) + 2 × CPU credits earned per hour (12)

    5. Phase I: The CPU usage is 10%, which is equal to the baseline performance. The instance earns the same CPU credits as it consumes, and the CPU credit balance remains unchanged.

      At the end of this phase, the CPU credit balance is 0.

      CPU credit balance (0) = CPU credit balance at the end of phase H (0) – 5 × CPU credits consumed per hour (12) + 5 × CPU credits earned per hour (12)

    6. Phase J: The CPU usage is 0%. The instance is idle for 3 hours and earns 12 CPU credits per hour. All of the earned CPU credits are accrued in the CPU credit balance.

      At the end of this phase, the CPU credit balance is 36.

      CPU credit balance (36) = CPU credit balance at the end of phase I (0) + 3 × CPU credits earned per hour (12)

Unlimited mode

In the unlimited mode, a burstable performance instance can use advance CPU credits or overdrawn CPU credits to maintain high CPU performance whenever required, without being limited to the baseline CPU performance.

This section uses the ecs.t5-c1m1.xlarge instance for example.
Note The ecs.t5-c1m1.xlarge instance has the following features:
  • It is configured with 4 vCPUs and 4 GiB memory.
  • It receives 120 launch CPU credits upon creation (30 CPU credits for each vCPU).
  • It has a baseline performance of 15%.
  • It earns 36 CPU credits per hour and accrues a maximum of 864 CPU credits over a 24-hour period. For more information, see t5 instance type family.
  • It consumes 36 CPU credits per hour when running at baseline performance.

The following figure shows how the CPU credits of the ecs.t5-c1m1.xlarge instance change in the unlimited mode.



As shown in the preceding figure, CPU credit changes over time with the following distinct phrases:

  • 0–24 hours

    Phase A: The instance earns 120 launch CPU credits after being started. The initial CPU usage is 0% and the CPU credits continue to accrue until they reach the maximum value at hour 24.

    At the end of this phase, the available CPU credits reach 984.

    Available CPU credits (984) = Launch CPU credits (120) + Maximum CPU credit balance (864)

  • 25–48 hours
    1. Phase B: The CPU usage is 15%, which is equal to the baseline performance. Launch CPU credits are preferentially used and will not be recovered after being used up. The instance consumes 36 CPU credits per hour when it starts to run.

      At the end of this phase, the available CPU credits reach 864.

      Available CPU credits (864) = CPU credits at the end of phase A (984) – Launch CPU credits (120)

    2. Phase C: The CPU usage is 15%, which is equal to the baseline performance. The instance earns the same CPU credits as it consumes and the CPU credit balance remains unchanged.

      At the end of this phase, the CPU credit balance reaches the maximum value 864.

    3. Phase D: The CPU usage is 5%. Although the CPU usage is lower than the baseline performance, the CPU credit balance has reached the upper limit and remains unchanged.

      At the end of this phase, the CPU credit balance reaches the maximum value 864.

    4. Phase E: The instance runs at full capacity and consumes 240 CPU credits per hour. The baseline performance cannot meet requirements, and the instance starts to consume CPU credits accrued in the CPU credit balance.

      At the end of this phase, the CPU credit balance is used up.

    5. Phase F: The instance runs at full capacity and consumes 240 CPU credits per hour. The baseline performance cannot meet requirements, and the instance starts to consume advance CPU credits. For more information, see Unlimited mode.

      At the end of this phase, all of the 864 advance CPU credits are used up.

    6. Phase G: The instance runs at full capacity and consumes 240 CPU credits per hour. The advance CPU credits are used up and the instance starts to consume overdrawn CPU credits, which incur additional fees. For more information, see Unlimited mode.

      At the end of this phase, the available CPU credits remain unchanged and the instance overdraws 864 CPU credits.

  • 48–72 hours

    Phase H: The CPU usage is 0%. The earned CPU credits are first used to pay down the advance CPU credits until the advance CPU credits are cleared at hour 72.

    At the end of this phase, the advance CPU credits are recovered and the CPU credit balance remains at 0.

  • 73–96 hours

    Phase I: The CPU usage is 0%. The instance is idle for 24 hours and earns 36 CPU credits per hour. All of the earned CPU credits are accrued in the CPU credit balance until the CPU credit balance reaches the maximum value at hour 96.

    At the end of this phase, the CPU credit balance reaches the maximum value 864.