Enable CPU Suppress

更新时间:
复制 MD 格式

In dynamic resource overcommit scenarios, unused CPU from high-priority (Guaranteed and Burstable) pods can be allocated to BestEffort (BE) workloads. CPU Suppress dynamically limits BE pod CPU usage based on node utilization to protect latency-sensitive (LS) pods and keep cluster resource usage within a safe threshold.

CPU Suppress requires dynamic resource overcommitment.

How it works

CPU Suppress monitors node CPU utilization against a configurable threshold (cpuSuppressThresholdPercent, default: 65%). BE pod cpuset expands and contracts based on LS pod headroom:

  • LS load increases — CPU Suppress reduces BE pod cpuset, protecting LS response times

  • LS load decreases — CPU Suppress expands BE pod cpuset, reclaiming idle capacity

The following figure shows the relationship between CPU threshold, LS pod usage, and BE pod CPU restriction.

image

The figure uses the following terms:

  • CPU Threshold: the node CPU utilization threshold

  • Pod (LS).Usage: CPU usage of LS pods

  • CPU Restriction for BE: CPU resources available to BE pods

Align cpuSuppressThresholdPercent with the reserved CPU watermark in your dynamic resource overcommitment configuration.

Prerequisites

Ensure you have:

See Pod QoS classes and Assign memory resources to containers and pods in the Kubernetes documentation.

Billing

Installing and using ack-koordinator is free. Charges may apply in these cases:

  • Worker node resources: ack-koordinator is a non-managed component. It consumes worker node resources after installation. You can control the resource requests for each module during installation.

  • Prometheus metrics: If you enable Prometheus metrics for ack-koordinator and use Managed Service for Prometheus, the metrics count as custom metrics and incur charges. Fees depend on cluster size and application count. Before enabling, review the Billing page for Managed Service for Prometheus to understand the free quota and billing rules. For usage monitoring, see Query the amount of observable data and bills.

Procedure

CPU Suppress is configured at the cluster level through the ack-slo-config ConfigMap in the kube-system namespace.

  1. Create a file named configmap.yaml with the following content:

    apiVersion: v1
    kind: ConfigMap
    metadata:
      name: ack-slo-config
      namespace: kube-system
    data:
      resource-threshold-config: |
        {
          "clusterStrategy": {
            "enable": true
          }
        }
  2. Apply the ConfigMap. The method depends on whether ack-slo-config exists in your cluster:

    • If the ConfigMap exists, patch it to update only the relevant field:

      kubectl patch cm -n kube-system ack-slo-config --patch "$(cat configmap.yaml)"
    • If the ConfigMap does not exist, create it:

      kubectl apply -f configmap.yaml
  3. Verify CPU Suppress is active by checking BE pod CPU allocation:

    cat /sys/fs/cgroup/cpuset/kubepods.slice/kubepods-besteffort.slice/cpuset.cpus

    Expected output:

    10-25,35-51,62-77,87-103

    This confirms BE pods are restricted to a CPU subset and CPU Suppress is active.

  4. Optional: Set the CPU utilization threshold. Update configmap.yaml with the following content and reapply:

    apiVersion: v1
    kind: ConfigMap
    metadata:
      name: ack-slo-config
      namespace: kube-system
    data:
      resource-threshold-config: |
        {
          "clusterStrategy": {
            "enable": true,
            "cpuSuppressThresholdPercent": 65
          }
        }

    Default: 65%. Align cpuSuppressThresholdPercent with your workload profile or dynamic resource overcommitment CPU watermark.

Parameters

Parameter Type Value range Default Description
enable Boolean true / false Enables (true) or disables (false) CPU Suppress
cpuSuppressThresholdPercent Integer [0, 100] 65 Node CPU utilization threshold (%). BE pod CPU resources shrink when utilization exceeds this value and expand when it drops below.

Next steps

ack-koordinator provides additional resource limits for overcommitted workloads: