All Products
Search
Document Center

Alibaba Cloud Linux:Enable CPU burst for the cgroup v1 interface

Last Updated:Jan 12, 2026

CPU Burst allows a container, under CPU throttling, to use additional CPU resources in bursts, improving container performance and reducing system latency. In kernel version 4.19.91-22.al7 and later, Alibaba Cloud Linux 2 and Alibaba Cloud Linux 3 support CPU Burst for the cgroup v1 interface. This topic explains how to enable CPU Burst and query its statistics.

Note

For information about the CPU burst feature, see Kill the Annoying CPU Throttling.

Enable CPU burst

  1. Check if the global CPU Burst switch is enabled.

    cat /proc/sys/kernel/sched_cfs_bw_burst_enabled

    Description about the command output:

    • 1: The switch is enabled. This is the default setting.

      Note

      By default, the CPU burst feature is globally enabled for cgroup v1.

    • Any other value: The switch is disabled.

      To enable it, run the following command:

      sudo sh -c 'echo 1 > /proc/sys/kernel/sched_cfs_bw_burst_enabled'
  2. Enable CPU Burst for a specific child cgroup.

    Note

    CPU Burst is disabled by default for individual child cgroups.

    1. Navigate to the child cgroup's directory and check if CFS Bandwidth Controller throttling is active.

      Replace <cgroup> with your child cgroup's directory name.

      cd /sys/fs/cgroup/cpu/<cgroup>/
      cat cpu.cfs_period_us
      cat cpu.cfs_quota_us

      If cpu.cfs_quota_us returns a positive integer, throttling is active. CPU Burst takes effect only when throttling is active.

    2. Check the current CPU Burst setting.

      cat cpu.cfs_burst_us

      The default return value is 0, meaning CPU Burst is disabled.

    3. Set cpu.cfs_burst_us to enable CPU Burst.

      To enable CPU Burst, set this parameter to a positive integer. This value is the maximum burstable CPU time, in microseconds, that the cgroup can accumulate. The following example shows how to enable the feature.

      1. Configure cpu.cfs_quota_us and cpu.cfs_period_us for the CFS Bandwidth Controller.

        The following configuration sets the CPU scheduling period (cpu.cfs_period_us) to 100 ms and the CPU quota per period (cpu.cfs_quota_us) to 400 ms. This limits the cgroup to the equivalent of 4 CPUs (400,000 / 100,000).

        sudo sh -c 'echo 400000 > cpu.cfs_quota_us'
        sudo sh -c 'echo 100000 > cpu.cfs_period_us'
      2. Configure cpu.cfs_burst_us to enable CPU Burst.

        The following configuration sets the burstable CPU time to 600 ms. This enables CPU Burst and allows the cgroup to use an additional 6 CPUs' worth of processing time in a burst (600,000 / 100,000).

        sudo sh -c 'echo 600000 > cpu.cfs_burst_us'

Query CPU burst statistics

To query CPU Burst statistics, navigate to the child cgroup's directory.

Replace <cgroup> with your child cgroup's directory name.

cd /sys/fs/cgroup/cpu/<cgroup>/
cat cpu.stat

The key fields in the output are:

  • nr_burst: The total number of CPU burst events.

  • burst_time: The total time spent using burstable CPU resources.