تخطي إلى المحتوى
Korur

CFS bandwidth control and CPU throttling in pods

How cpu.max is enforced inside the Linux scheduler, why fan-out services are throttled below their limit, and what cpu.stat really counts.

Give a service a Kubernetes CPU limit of one core, watch it average well under that core, and its tail latency can still sit at the length of a scheduler period. In the lab at the end of this article, a request that needs 160 ms of CPU spread over eight threads finishes in 20.6 ms at the 90th percentile without a limit and in 105.8 ms with cpu.max set to 100000 100000, while the group spends 32.1 s of CPU across 431 periods of 100 ms, about three quarters of its quota. Nothing is wrong with the kernel. The limit is doing exactly what its data structures say it does, and those data structures are not the ones most people picture when they write limits.cpu: 1.

This article follows CFS bandwidth control from the cgroup file to the functions in kernel/sched/fair.c that charge, throttle and refill a group, pinned to the Linux v7.2 tag, the release the lab's 7.2.13 stable kernel is built on. It covers the change of 6.18 that moved throttling to the return to user space, the slice-expiry fix of 5.4 that most throttling folklore predates, cpu.max.burst, what each counter in cpu.stat measures, and how the kubelet turns a pod spec into these numbers in Kubernetes v1.37.2.

What the limit promises

On cgroup v2 the whole interface is two files. cpu.max holds $MAX $PERIOD in microseconds, defaults to max 100000, and a lone number written to it replaces only $MAX. cpu.max.burst defaults to 0 and accepts values in [0, $MAX]. Both affect only tasks in the fair class; SCHED_FIFO, SCHED_RR and deadline tasks are not limited by them 1. The kernel enforces a floor of 1 ms on both quota and period and a ceiling of 1 s on the period, and rejects a burst larger than the quota; the checks live in tg_set_bandwidth() in kernel/sched/core.c, which returns -EINVAL for each violation 23.

The promise is narrow: within each period, the fair-class tasks of the group together receive at most $MAX microseconds of CPU time. It is not a rate of one CPU, it is not averaged over a second, and it does not say on how many CPUs that time may be spent. A group with 100000 100000 may run on twenty CPUs at once for five milliseconds each, and then sit out the remaining 95 ms of the period. Everything that follows is a consequence of that shape.

The hierarchy adds a second rule, and here cgroup v2 departs from the kernel documentation. sched-bwc.rst states that "the interface enforces that an individual entity's bandwidth is always attainable, that is: max(c_i) <= C", where C is the parent's bandwidth and c_i are its children 3. In the code that enforcement holds only on cgroup v1. Every write to cpu.max reaches tg_set_cfs_bandwidth(), which calls __cfs_schedulable(), and that function runs walk_tg_tree(tg_cfs_schedulable_down, tg_nop, &data) 2. walk_tg_tree() is walk_tg_tree_from(&root_task_group, ...) 4, so each write walks the entire task-group hierarchy from the root and recomputes hierarchical_quota for every group on the machine, not only for the subtree of the group being written. On a node with many pod cgroups that is the cost of every kubelet write to cpu.max. Inside tg_cfs_schedulable_down(), the cgroup v1 branch returns -EINVAL when a child's bandwidth exceeds its parent's, while the cgroup v2 branch never returns an error and simply keeps the smaller of the child's and the parent's bandwidth 2. On cgroup v2 the write that cgroup v1 rejects therefore succeeds. On the lab machine, inside a delegated scope with pod/cpu.max at 100000 100000, writing 300000 100000 to pod/ctr/cpu.max succeeded and read back unchanged. The file then shows three CPUs and the child gets at most one. What the function stores in hierarchical_quota is not a quota in microseconds but a normalized bandwidth ratio: normalize_cfs_quota() turns quota and period into to_ratio(period, quota), and the stored value is the minimum of that ratio over the group and its ancestors. The scheduler uses it to answer whether a task is bandwidth-constrained anywhere above it 2. The children of one parent may also together oversubscribe it, so that the tree stays work-conserving. A group is therefore throttled in two ways: when it spends its own quota, or when an ancestor spends its quota, in which case the child is stopped even though its own pool still holds runtime 3.

How the kubelet writes it

Kubernetes enforces a CPU limit by throttling and never kills a container for CPU use; the documentation is explicit that the kernel restricts access to the CPU when a container approaches its limit 5. The arithmetic is in pkg/kubelet/cm/helpers_linux.go. MilliCPUToQuota() computes quota = milliCPU * period / 1000 and raises anything below 1000 µs to 1000 µs, so a limit of 500m becomes 50000 100000 and any limit under 10m becomes the kernel minimum of 1 ms. MilliCPUToShares() computes milliCPU * 1024 / 1000, clamped to [2, 262144] 6. The container-level values are produced by calculateLinuxResources() in pkg/kubelet/kuberuntime/kuberuntime_container_linux.go, which calls the same two helpers and writes -1 as the quota when quota is disabled for that container 7.

There are two quotas per pod, not one. ResourceConfigForPod() also sets a quota on the pod cgroup: always for a Guaranteed pod, and for a Burstable pod only when every container declares a CPU limit or the pod itself carries a pod-level limit 6. Pod-level resources are beta and enabled by default since 1.34 8. With a pod-level limit, getCPULimit() gives every container that declares no limit of its own the pod's limit as its quota 7. Each such container may then spend the whole pod budget alone, while the pod cgroup caps them together. When two of them are busy in the same period, the one that loses is stopped by the pod cgroup's quota, not by its own. That case matters later, because the container's own cpu.stat does not report that throttling.

The period is a kubelet setting, not a pod setting. cpuCFSQuota defaults to true and cpuCFSQuotaPeriod to 100ms, inside the kernel's 1 ms to 1 s range 9. The gate that lets an operator change the period, CustomCPUCFSQuotaPeriod, has been GA and on by default since 1.36 8, so a node-wide period other than 100 ms is now a supported configuration rather than an alpha experiment. Whether you should use it depends on the parallelism of your workloads, which the lab answers with numbers.

Two levels of state: the pool and the silos

A CPU-limited group owns one struct cfs_bandwidth, embedded in its struct task_group, and one struct cfs_rq per CPU. The first is the global pool, the second are what the kernel documentation calls cpu-local silos 3. The relevant fields at v7.2 are these 4:

kernel/sched/sched.h at v7.2, CONFIG_CFS_BANDWIDTH fields (abridged, two comments added)c
struct cfs_bandwidth {
	raw_spinlock_t		lock;
	ktime_t			period;
	u64			quota;
	u64			runtime;	/* unassigned pool */
	u64			burst;
	u64			runtime_snap;
	s64			hierarchical_quota;
	u8			idle;
	u8			period_active;
	u8			slack_started;
	struct hrtimer		period_timer;
	struct hrtimer		slack_timer;
	struct list_head	throttled_cfs_rq;
	/* Statistics: */
	int			nr_periods;
	int			nr_throttled;
	int			nr_burst;
	u64			throttled_time;
	u64			burst_time;
};

struct cfs_rq {
	/* ... */
	int			runtime_enabled;
	s64			runtime_remaining;	/* this CPU's silo */
	u64			throttled_clock;
	u64			throttled_clock_self;
	u64			throttled_clock_self_time;
	bool			throttled:1;
	int			throttle_count;
	struct list_head	throttled_list;
	struct list_head	throttled_limbo_list;
};

cfs_b->runtime is protected by cfs_b->lock, a single spinlock shared by every CPU the group runs on. Charging each tick of execution against it would turn a 100-CPU node into a lock convoy, so the kernel does not. Each CPU's cfs_rq->runtime_remaining is charged locally under the runqueue lock, and only when it runs dry does that CPU go to the pool and take a batch, the slice. The slice is /proc/sys/kernel/sched_cfs_bandwidth_slice_us, 5 ms by default; the documentation states the trade-off plainly: larger slices cut transfer overhead, smaller slices allow finer consumption 3. In fair.c the default is the literal sysctl_sched_cfs_bandwidth_slice = 5000UL 10.

The global pool in struct cfs_bandwidth and the per-CPU balances in each cfs_rq, with the functions that move runtime between them.

The split explains most surprises. Quota that has moved into a silo is no longer available to other CPUs. A thread that wakes on CPU 7 cannot use the 4 ms sitting in CPU 3's silo; it must find runtime in the pool, and if the pool is empty it is throttled while runtime exists elsewhere in the group. Two mechanisms limit the damage, the slack return and the end of slice expiry, and both are covered below.

The accounting path in fair.c

Charging

Every fair-class accounting update goes through update_curr(), called from the tick, from enqueue and dequeue, and from preemption checks. After it advances the entity's virtual runtime it calls account_cfs_rq_runtime(cfs_rq, delta_exec). That wrapper returns immediately unless the static key __cfs_bandwidth_used is enabled and cfs_rq->runtime_enabled is set, so a node with no CPU limits anywhere pays a patched-out branch and nothing more 10. __account_cfs_rq_runtime() then subtracts delta_exec from runtime_remaining and, if the balance is still positive, returns. Only a non-positive balance leads to throttle_cfs_rq().

Asking for a slice

throttle_cfs_rq() first tries not to throttle. Under cfs_b->lock it asks __assign_cfs_rq_runtime() for a full slice if the current entity is still runnable, or for a single nanosecond if it is not, which is enough to be picked again later. The assign function computes the deficit plus target, takes min(cfs_b->runtime, min_amount) from the pool, clears cfs_b->idle, and starts the period timer through start_cfs_bandwidth() if it was stopped. If the silo ends positive, the function returns and nothing is throttled 10. If the pool is empty, the cfs_rq is appended to cfs_b->throttled_cfs_rq, walk_tg_tree_from() runs tg_throttle_down() over the subtree to raise throttle_count on every descendant, and cfs_rq->throttled is set. What happens to the tasks is the subject of the next section.

The period timer

period_timer is an hrtimer initialised in init_cfs_bandwidth() with a random offset inside the first period, so that thousands of groups do not refill on the same nanosecond. Its callback sched_cfs_period_timer() loops on hrtimer_forward_now(), and each iteration that finds the timer behind calls do_sched_cfs_period_timer() once with the overrun count of that forward, which can cover several periods in one call. That function adds the overrun count to nr_periods, calls __refill_cfs_bandwidth_runtime(), and if the throttled list is empty it marks the group idle; a group that stays idle for a whole period lets the timer stop until the next assignment restarts it. If the list is not empty, it adds the overrun to nr_throttled and loops over distribute_cfs_runtime() while the pool holds runtime 10.

kernel/sched/fair.c at v7.2: the refill, which also computes the burst statisticsc
void __refill_cfs_bandwidth_runtime(struct cfs_bandwidth *cfs_b)
{
	s64 runtime;

	if (unlikely(cfs_b->quota == RUNTIME_INF))
		return;

	cfs_b->runtime += cfs_b->quota;
	runtime = cfs_b->runtime_snap - cfs_b->runtime;
	if (runtime > 0) {
		cfs_b->burst_time += runtime;
		cfs_b->nr_burst++;
	}

	cfs_b->runtime = min(cfs_b->runtime, cfs_b->quota + cfs_b->burst);
	cfs_b->runtime_snap = cfs_b->runtime;
}

distribute_cfs_runtime() walks the throttled list in order. For each throttled cfs_rq it takes the runqueue lock, catches up update_curr(), and gives it exactly its deficit plus one nanosecond, -runtime_remaining + 1, not a slice. A cfs_rq on another CPU is unthrottled asynchronously: it is appended to that runqueue's cfsb_csd_list, and only if the list was empty, so that this is the first cfs_rq queued there, is the CSD raised through smp_call_function_single_async(). The remote CPU's __cfsb_csd_unthrottle() then drains the whole list under its own runqueue lock. Local cfs_rqs go on the timer CPU's own list and are drained at the end of the walk. If the pool runs dry part way through, the walk stops and the rest wait for the next period 10. The reason for the asynchronous path is scale, not locking. Josh Don's commit 8ad075c2eb1f, "sched: Async unthrottling for cfs bandwidth", moved the work out of the hrtimer callback because unthrottling every throttled cfs_rq of every CPU inline, with interrupts disabled, caused hard lockups on machines with 256 CPUs and on the order of 1000 throttled cgroups; with the CSD each CPU unthrottles its own cfs_rqs, which spreads the work across the machine 11. So a refill costs at most one IPI per remote runqueue with throttled work, and list order decides who waits when the refill falls short.

The timer also guards itself. The forward loop counts its own iterations with ++count > 3: if one invocation of the callback goes round the loop more than three times, because the callback cannot catch up with the timer, the kernel doubles the period, and the quota and burst with it, and logs cfs_period_timer[cpu%d]: period too short, scaling up through pr_warn_ratelimited(), provided the doubled period stays below the 1 s ceiling. Otherwise it leaves the period alone and logs a different warning, period too short, but cannot scale up without losing precision 10. If that message appears in a node's kernel log, someone has set a period short enough that the timer cannot keep up, and the effective period is no longer the one in cpu.max.

Returning slack

When the last entity leaves a cfs_rq, return_cfs_rq_runtime() hands back everything above min_cfs_rq_runtime, a compile-time constant of 1 ms. If that pushes the pool above one slice while other CPUs of the group are throttled, start_cfs_slack_bandwidth() arms slack_timer for cfs_bandwidth_slack_period, 5 ms, unless the period timer fires within 7 ms anyway, the slack period plus min_bandwidth_expiration of 2 ms. The slack handler then runs distribute_cfs_runtime() itself 10. The 1 ms that stays behind is deliberate: it keeps a CPU that sleeps and wakes in quick succession from returning to the global lock on every wakeup 3.

Constants and defaults of CFS bandwidth control at v7.2
NameValueWhereEffect
sched_cfs_bandwidth_slice_us5000 µssysctl, fair.cRuntime moved from the pool to a CPU per request
min_cfs_rq_runtime1 msfair.cRuntime an idle CPU keeps instead of returning it
cfs_bandwidth_slack_period5 msfair.cDelay before returned slack is redistributed
min_bandwidth_expiration2 msfair.cNo slack distribution this close to a refill
default_bw_period_us()100000 µssched.hPeriod when only $MAX is set
min_bw_quota_period_us1 mscore.cSmallest accepted quota and period
max_bw_quota_period_us1 score.cLargest accepted period

Throttling since 6.18: tasks park at the user boundary

Until 6.17, throttling a cfs_rq dequeued the group's scheduling entity from its parent. Every task beneath it vanished from the CPU at once, whatever it was doing, including a task inside the kernel holding a lock. The commit that replaced this, "sched/fair: Switch to task based throttle model" by Valentin Schneider and Aaron Lu, merged for 6.18, describes the failure that motivated it: a reader woken on a percpu_rwsem could not run until its group's next period, writers queued behind it, more readers piled up, and the result could be hung-task reports 12. A throttled task in the kernel was a priority inversion with a timer attached.

At v7.2 the throttled cfs_rq stays on its parent. throttle_cfs_rq() marks it throttled and calls task_throttle_setup_work() on the running task, which queues sched_throttle_work through task_work_add(..., TWA_RESUME); kernel threads and exiting tasks are skipped because they never return to user space. A task picked later from a throttled hierarchy gets the same work from set_next_task_fair(). When the task reaches the exit to user mode, throttle_cfs_rq_work() runs: if its cfs_rq still has a non-zero throttle_count, the task is dequeued with DEQUEUE_SLEEP | DEQUEUE_THROTTLE, put on cfs_rq->throttled_limbo_list, and marked p->throttled. On unthrottle, tg_unthrottle_up() splices the limbo list and re-enqueues each task with ENQUEUE_WAKEUP, stopping early if the hierarchy is throttled again on the way 10.

Three consequences matter in practice. First, code in a system call or page fault runs to the user boundary even after the group is out of quota, so the hard per-period ceiling became slightly softer; a syscall-heavy workload can overrun by the length of its kernel paths. That is a better trade than holding a lock across a 90 ms sleep, and I would not want the old behaviour back. Second, throttled time is now counted from the moment tasks actually park: record_throttle_clock() is called from the dequeue path for a throttled task, and unthrottle_cfs_rq() adds rq_clock(rq) - cfs_rq->throttled_clock to cfs_b->throttled_time 10. Third, anything that reasoned about throttling from the old dequeue of the group entity, such as a tracing script that watched for that dequeue, needs to be rewritten for kernels from 6.18 on.

Why fan-out services hit the wall

Take the lab's workload: a request wakes eight threads, each of which burns 20 ms of its own CPU time, and the request ends when the last one finishes. That is 160 ms of CPU per request, a reasonable model of a garbage collector, a parallel query executor, or a Go service whose goroutines fan out to as many Ps as GOMAXPROCS allows. With cpu.max at 100000 100000 and the request starting at the top of a period, eight CPUs pull slices from the pool and spend the full 100 ms of quota in 12.5 ms of wall time. Every thread then parks for the remaining 87.5 ms. The refill releases them, the last 60 ms of CPU takes 7.5 ms on eight CPUs, and the request ends at 107.5 ms instead of 20 ms.

A model of one 160 ms fan-out request under cpu.max 100000 100000: eight threads spend the whole quota in 12.5 ms and wait for the refill.

Where the request starts inside the period changes the number but not the shape. A request that arrives late in a period finds a full pool and the refill close by, and finishes quickly; one that arrives just after a refill sits out almost a whole period. That is why the latency distribution under a limit is wide and why its upper percentiles converge on the period, not on the CPU the request needs. Averaged over a second, the same group uses a fraction of a core and every dashboard built on usage_usec reports a healthy service.

The kernel documentation's example of a 10 ms quota in a 50 ms period says a short period gives a consistent latency response at the expense of burst capacity 3. That is true for a single-threaded group. For a fan-out group it is the wrong advice, and the lab shows why: with 10000 10000 the same request gets 10 ms of CPU every 10 ms, which is one CPU's worth spread over eight threads, and needs sixteen periods. The long period at least lets the group finish most of its work at full parallelism before it stops. The rule I use is arithmetic: a request that needs C ms of CPU on N threads is unthrottled only if C fits in the runtime the group can hold in one period, quota plus whatever burst has accumulated, and C / N is short relative to the period.

The slice-expiry bug and what 5.4 changed

Much of what is written about CPU limits was written against kernels that are long gone. Before the fix that landed in 5.4, runtime in a CPU's silo carried an expiry: cfs_rq->runtime_expires and cfs_b->expires_seq let the kernel discard local runtime at the period boundary through expire_cfs_rq_runtime(). The commit that removed it, "sched/fair: Fix low cpu usage with high throttling by removing expiration of cpu-local slices" by Dave Chiluk, describes the symptom: highly threaded, non-CPU-bound applications under a quota were throttled in many periods while using well below their quota. The cause was slices handed to CPUs, not fully used, and then expired, so the group paid for runtime it never ran. Its Fixes: tag points at 512ac999d275, "sched/fair: Fix bandwidth timer clock drift condition", which had made the expiry work as designed after years in which a broken condition kept extending local deadlines 13.

The patch removes expiry from __refill_cfs_bandwidth_runtime(), assign_cfs_rq_runtime(), distribute_cfs_runtime(), do_sched_cfs_period_timer(), the slack path and start_cfs_bandwidth(), and drops the two fields from sched.h. It reports that an artificial test with a 10 ms quota per 100 ms period on an 80-CPU machine improved by almost thirty times 13. The commit was merged for 5.4 and backported to stable kernels, for example 5.3.9, where it appears as 2bd11026299b 14. A mainline version number is therefore a poor test: check the changelog of the kernel your nodes actually run, or your distribution's, for the commit title. Kubernetes users had been tracking the symptom since August 2018 in issue 67577, "CFS quotas can lead to unnecessary throttling" 15.

The price is a bounded overrun, and the kernel documentation now states it: a slice assigned to a CPU does not expire, so a threaded application can briefly exceed its quota by the unused runtime left on each CPU it runs on, typically at most 1 ms per CPU because of min_cfs_rq_runtime, while average usage over a longer window stays at the quota 3. On a 128-CPU node that is up to 128 ms of CPU above quota in one period for a group spread across all of them, which is real but bounded and repaid in the periods after. Any argument for disabling limits that relies on the behaviour before this fix should be checked against the node's kernel before it is repeated.

cpu.max.burst

Burst arrived in 5.14 with "sched/fair: Introduce the burstable CFS controller" by Huaixin Chang. It lets a group bank unused quota and spend it later, capped so the pool never holds more than quota + burst, with burst <= quota enforced at write time 16. The whole mechanism is the min() in the refill shown above. The commit also makes the refill run when the group is idle, which is what lets idle periods fill the bank 16. The documentation describes the feature as borrowing "time now against our future underrun". Modelling each group's usage as a 95th percentile x plus an excess e up to its worst case, it argues that the scheme stays stable because "every overrun must be paired with an underrun as long as our x is above the average", and bounds the worst-case deadline miss by the sum of the e_i terms; the cost it names is increased interference with the other users of the system 3. The implementation is stricter about order than that argument: the min() in __refill_cfs_bandwidth_runtime() only lets the pool carry over runtime that went unused in earlier periods, so in my reading of the refill code a group can spend only underrun it has already banked, never underrun it is expected to have later 10.

Read the refill once more and the statistics fall out. runtime_snap is the pool right after the previous refill. If, after adding this period's quota, the pool is lower than that snapshot, the group consumed more than one quota during the period and the difference is added to burst_time, with nr_burst incremented 10. So burst_usec is the CPU time spent above quota, summed over periods, and nr_bursts counts the periods in which that happened.

Burst only helps if the bank is full when the spike arrives, and filling it takes idle periods. Follow the timer: the period in which the group last ran ends with a refill and idle set; the next idle period ends with a second refill, which can top the pool up to quota + burst, and the timer then stops until the next assignment. A spike that arrives one quiet period after the last one finds a partial bank. The lab shows exactly that: with burst the median request is unthrottled, but requests that follow each other closely still are.

Kubernetes has no field for it. The CRI LinuxContainerResources message at v1.37.2 carries cpu_period, cpu_quota, cpu_shares, memory, OOM score, cpuset and hugepage fields and a free-form unified map, with no burst field 17, and the kubelet code that fills the CPU fields computes only period, quota and shares 7. A cluster operator who wants burst today has to write cpu.max.burst outside the kubelet, for example from a node agent, and has to accept that the kubelet will not reconcile it. I would not build that for one service. For a fleet of latency-sensitive fan-out services it can be the cheapest fix available.

Reading cpu.stat without fooling yourself

cpu.stat always reports usage_usec, user_usec and system_usec, and with the controller enabled the five bandwidth fields nr_periods, nr_throttled, throttled_usec, nr_bursts and burst_usec, which cover only fair-class tasks 1. They are printed by cpu_extra_stat_show() straight from struct cfs_bandwidth, converting the nanosecond counters to microseconds 2. The semantics are less obvious than the names.

What each bandwidth counter in cpu.stat measures at v7.2
FieldSourceIncremented whenTrap
nr_periodscfs_b->nr_periodsthe period timer fires, by the overrun countThe timer stops after an idle period, so this is not wall time divided by the period
nr_throttledcfs_b->nr_throttleda period ends with the throttled list non-emptyCounts periods, not throttle events or tasks
throttled_useccfs_b->throttled_timea throttled cfs_rq of this group is unthrottledSummed over CPUs; can exceed wall time
nr_burstscfs_b->nr_bursta refill finds consumption above one quotaZero whenever cpu.max.burst is 0
burst_useccfs_b->burst_timesame, by the amount above quotaRuntime, not wall time
throttled_usec in cpu.stat.localthrottled_clock_self_time per CPUthis group's cfs_rq sat in a throttled hierarchyThe only counter that shows throttling by an ancestor

throttled_usec is the one most often misread. The accumulation in unthrottle_cfs_rq() runs once per throttled cfs_rq, that is once per CPU, so a group throttled on eight CPUs for 80 ms gains 640 ms 10. In the lab's one-CPU run the group used 32.1 s of CPU and accumulated 64.2 s of throttled time in 431 periods, which is 43.1 s of wall time at 100 ms each. Read it as CPU-time-equivalent stalls, not as how long the service was stopped. Dividing it by nr_throttled gives an average stall per throttled period times the number of CPUs involved, which is a useful number only if you know the parallelism.

The second trap is hierarchy. The five fields in cpu.stat belong to the group's own cfs_bandwidth. If the group has no quota and its parent throttles, the child's nr_throttled and throttled_usec stay at zero. cpu.stat.local, printed by cpu_local_stat_show(), sums throttled_clock_self_time over every possible CPU, and that clock runs whenever the group's cfs_rq is inside a throttled hierarchy, whoever owns the quota 210. In the lab's nested run, with the pod cgroup at one CPU and the container at max, the container reported nr_throttled 0 and throttled_usec 0 in cpu.stat and 65.8 s in cpu.stat.local. With pod-level limits in Kubernetes, where several containers share one pod quota, that is the file to alert on.

The ratio people plot, nr_throttled / nr_periods, is a decent alarm and a poor diagnosis: it says how often a period ended with someone waiting, not for how long or whether requests felt it. Pair it with the application's latency percentiles and ask whether the tail sits at multiples of the period.

Lab: a fan-out service under cpu.max

The lab needs no Kubernetes, no root and no container runtime, because a systemd user scope with Delegate=yes gives an unprivileged user a cgroup v2 directory it may write 18. It ran on Fedora 43 with kernel 7.2.13-100.fc43.x86_64, systemd 258 (258.11-1.fc43) and GCC 15.3.1, on a 13th Gen Intel Core i9-13900H with 20 logical CPUs, and /proc/sys/kernel/sched_cfs_bandwidth_slice_us at its default of 5000. The workstation was shared with other jobs during the run; matrix.sh below records the one-minute load average at the start of every run, and the unlimited row is the control for that noise.

Check that the user manager delegates the cpu controllershell
uname -r
cat /sys/fs/cgroup/user.slice/user-$(id -u).slice/user@$(id -u).service/cgroup.controllers
# expected to include: cpu
cat /proc/sys/kernel/sched_cfs_bandwidth_slice_us

The load generator measures work in thread CPU time, not in loop iterations, so frequency scaling and the hybrid core types change wall time but not the work each request needs. Gaps between requests are jittered by default, between GAP_MS and twice that, so that request starts sample every phase of the period. With a fixed gap the request loop can phase-lock to the period timer and every request sees the same latency, which hides the spread that real traffic produces. The optional fifth argument JITTER set to 0 turns the jitter off so that the effect can be seen; the fixed-gap run is shown after the build commands.

fanout.c: N threads, W ms of CPU each per request, latency percentilesc
#define _GNU_SOURCE
#include <pthread.h>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>

static int nthreads, work_ms, nreq, gap_ms, jitter = 1;
static pthread_barrier_t start_b, end_b;

static double now_ms(clockid_t c) {
  struct timespec ts; clock_gettime(c, &ts);
  return ts.tv_sec * 1e3 + ts.tv_nsec / 1e6;
}

static void *worker(void *arg) {
  (void)arg;
  for (int r = 0; r < nreq; r++) {
    pthread_barrier_wait(&start_b);
    double t0 = now_ms(CLOCK_THREAD_CPUTIME_ID);
    while (now_ms(CLOCK_THREAD_CPUTIME_ID) - t0 < work_ms) { }
    pthread_barrier_wait(&end_b);
  }
  return NULL;
}

static int cmp(const void *a, const void *b) {
  double x = *(const double *)a, y = *(const double *)b;
  return (x > y) - (x < y);
}

int main(int argc, char **argv) {
  if (argc != 5 && argc != 6) {
    fprintf(stderr, "usage: fanout THREADS WORK_MS REQUESTS GAP_MS [JITTER]\n"); return 2;
  }
  nthreads = atoi(argv[1]); work_ms = atoi(argv[2]); nreq = atoi(argv[3]); gap_ms = atoi(argv[4]);
  if (argc == 6) jitter = atoi(argv[5]);
  if (nthreads < 1 || work_ms < 1 || nreq < 1 || gap_ms < 1) {
    fprintf(stderr, "THREADS, WORK_MS, REQUESTS and GAP_MS must be at least 1\n"); return 2;
  }
  srand(1);
  pthread_barrier_init(&start_b, NULL, nthreads + 1);
  pthread_barrier_init(&end_b, NULL, nthreads + 1);
  pthread_t *t = calloc(nthreads, sizeof *t);
  double *lat = calloc(nreq, sizeof *lat);
  for (int i = 0; i < nthreads; i++) pthread_create(&t[i], NULL, worker, NULL);
  for (int r = 0; r < nreq; r++) {
    /* jitter (the default) spreads request starts over every phase of the period */
    long g = jitter ? gap_ms + rand() % gap_ms : gap_ms;
    struct timespec gap = { g / 1000, (g % 1000) * 1000000L };
    nanosleep(&gap, NULL);
    double s = now_ms(CLOCK_MONOTONIC);
    pthread_barrier_wait(&start_b);
    pthread_barrier_wait(&end_b);
    lat[r] = now_ms(CLOCK_MONOTONIC) - s;
  }
  qsort(lat, nreq, sizeof *lat, cmp);
  printf("cpu_per_req_ms=%d p50=%.1f p90=%.1f p99=%.1f max=%.1f\n", nthreads * work_ms,
         lat[nreq / 2], lat[nreq * 9 / 10], lat[nreq * 99 / 100], lat[nreq - 1]);
  return 0;
}
run.sh: set cpu.max and cpu.max.burst on the scope, run, print the cpu.stat deltashell
#!/bin/bash
# usage: run.sh MAX PERIOD BURST -- command...
set -euo pipefail
CG=/sys/fs/cgroup$(sed -n 's/^0:://p' /proc/self/cgroup)
echo "$1 $2" > "$CG/cpu.max"
echo "$3" > "$CG/cpu.max.burst"
shift 4
echo "cpu.max=$(cat "$CG/cpu.max") cpu.max.burst=$(cat "$CG/cpu.max.burst")"
KEYS='usage_usec|nr_periods|nr_throttled|throttled_usec|nr_bursts|burst_usec'
BEFORE=$(mktemp); AFTER=$(mktemp)
grep -E "$KEYS" "$CG/cpu.stat" > "$BEFORE"
"$@"
grep -E "$KEYS" "$CG/cpu.stat" > "$AFTER"
paste "$BEFORE" "$AFTER" | awk '{printf "%s %d\n", $1, $4-$2}'
rm -f "$BEFORE" "$AFTER"
Build and run one configuration per scope (200 requests, gaps of 100 to 199 ms)shell
gcc -O2 -Wall -pthread -o fanout fanout.c
chmod +x run.sh

# control: no limit
systemd-run --user --scope --quiet -p Delegate=yes ./run.sh max 100000 0 -- ./fanout 8 20 200 100
# one CPU per 100 ms
systemd-run --user --scope --quiet -p Delegate=yes ./run.sh 100000 100000 0 -- ./fanout 8 20 200 100
# one CPU per 100 ms, burst of one quota
systemd-run --user --scope --quiet -p Delegate=yes ./run.sh 100000 100000 100000 -- ./fanout 8 20 200 100
# two CPUs per 100 ms
systemd-run --user --scope --quiet -p Delegate=yes ./run.sh 200000 100000 0 -- ./fanout 8 20 200 100
# one CPU per 10 ms
systemd-run --user --scope --quiet -p Delegate=yes ./run.sh 10000 10000 0 -- ./fanout 8 20 200 100
# one CPU per 100 ms, single thread doing the same 160 ms
systemd-run --user --scope --quiet -p Delegate=yes ./run.sh 100000 100000 0 -- ./fanout 1 160 200 100

The fixed-gap case uses the one-CPU limit, 100 requests and a constant gap of 200 ms. Each request plus its gap then spans three periods, and the loop settles into the same phase of the timer every time: every request is throttled once, at the same point, and waits for the same refill.

Fixed 200 ms gap, jitter off, one CPU per 100 ms (output on the lab machine)text
$ cat /proc/loadavg
4.78 5.89 10.41 ...
$ systemd-run --user --scope --quiet -p Delegate=yes ./run.sh 100000 100000 0 -- ./fanout 8 20 100 200 0
cpu.max=100000 100000 cpu.max.burst=0
cpu_per_req_ms=160 p50=99.9 p90=102.1 p99=107.6 max=107.6
usage_usec 16043614
nr_periods 300
nr_throttled 100
throttled_usec 59187687
nr_bursts 0
burst_usec 0

Exactly one throttled period per request, 100 of 300, and a p50 of 99.9 ms with a p90 of 102.1 ms: almost no spread. A repeat run gave p50 99.9 ms, p99 102.2 ms and again 100 throttled periods out of 300. A load test with a fixed request rate can therefore report a latency that is stable, wrong for real traffic in both directions, and dependent on where its first request happened to land.

Each configuration ran three times in sequence, driven by matrix.sh. The table gives the first pass, in which the unlimited control stayed at the 20 ms of work each request needs; the second and third passes ran under heavier load from other jobs and are discussed after the table, and the raw output of all three passes follows that discussion.

Fan-out of 8 threads x 20 ms CPU per request, 200 requests, kernel 7.2.13 (latency in ms, counters are cpu.stat deltas)
cpu.maxburstp50p90p99nr_periodsnr_throttledthrottled_usecburst_usec
max 100000020.320.623.90000
100000 100000067.9105.8109.0431191642337240
100000 10000010000020.440.175.53503634542859531688
200000 100000020.421.028.1342000
10000 100000154.5160.8164.8354330861361455180
100000 100000, 1 thread x 160 ms0164.5181.2198.8635000

The one-CPU limit moved p90 from 20.6 ms to 105.8 ms and p99 to 109.0 ms, which is the 107.5 ms of the model above plus scheduling overhead, and the median landed in between because request starts fall at every phase of the period. A burst of one quota brought the median back to 20.4 ms, the unlimited figure, and cut throttled periods from 191 to 36; 188 periods spent more than one quota, 9.53 s in total, about 51 ms each. Its p99 of 75.5 ms is the partial bank described earlier: requests that arrive one quiet period after the previous one find less than a full quota of burst. Two CPUs per period removed throttling altogether, because 160 ms fits inside a 200 ms quota. The 10 ms period was the worst configuration by far, with a median of 154.5 ms and 3,086 throttled periods out of 3,543: one CPU's worth of runtime per 10 ms, so the request needs sixteen periods whatever its parallelism. The single thread doing the same 160 ms under the same one-CPU limit was never throttled, because one thread cannot run faster than one CPU; its p90 and p99 in this pass were inflated by foreign load, and the third pass measured 161.2 ms and 162.7 ms. Note also that throttled_usec for the one-CPU row, 64.2 s, is twice the CPU the group consumed.

The second and third passes are a lesson of their own. Under load from other jobs the unlimited control rose to a p50 of 93.5 ms in the second pass, and the two-CPU row reached a p90 of 112.3 ms and 123.6 ms in the second and third passes with nr_throttled at 0 both times. That is contention for CPUs, not bandwidth control, and the counters say so. The throttling counters themselves reproduced: nr_throttled for the one-CPU row was 191, 183 and 193 across the three passes. When latency rises and nr_throttled does not, look at the node, not at the limit.

matrix.sh: every configuration three times, with the load average before each runshell
#!/bin/bash
# Runs every configuration three times; each run is 200 fan-out requests.
cd "$(dirname "$0")"
for rep in 1 2 3; do
while read -r name max period burst threads work; do
  echo "== $name rep=$rep threads=$threads work_ms=$work load=$(cut -d' ' -f1 /proc/loadavg)"
  systemd-run --user --scope --quiet -p Delegate=yes ./run.sh "$max" "$period" "$burst" -- ./fanout "$threads" "$work" 200 100
done <<'M'
unlimited max 100000 0 8 20
q1cpu 100000 100000 0 8 20
q1cpu-burst 100000 100000 100000 8 20
q2cpu 200000 100000 0 8 20
q1cpu-p10ms 10000 10000 0 8 20
q1cpu-1thread 100000 100000 0 1 160
M
done
matrix.sh output on the lab machine, all three passes (load is the one-minute load average at the start of the run)text
== unlimited rep=1 threads=8 work_ms=20 load=17.38
cpu.max=max 100000 cpu.max.burst=0
cpu_per_req_ms=160 p50=20.3 p90=20.6 p99=23.9 max=23.9
usage_usec 32075003
nr_periods 0
nr_throttled 0
throttled_usec 0
nr_bursts 0
burst_usec 0
== q1cpu rep=1 threads=8 work_ms=20 load=11.62
cpu.max=100000 100000 cpu.max.burst=0
cpu_per_req_ms=160 p50=67.9 p90=105.8 p99=109.0 max=109.2
usage_usec 32090140
nr_periods 431
nr_throttled 191
throttled_usec 64233724
nr_bursts 0
burst_usec 0
== q1cpu-burst rep=1 threads=8 work_ms=20 load=7.52
cpu.max=100000 100000 cpu.max.burst=100000
cpu_per_req_ms=160 p50=20.4 p90=40.1 p99=75.5 max=75.9
usage_usec 32077964
nr_periods 350
nr_throttled 36
throttled_usec 3454285
nr_bursts 188
burst_usec 9531688
== q2cpu rep=1 threads=8 work_ms=20 load=7.46
cpu.max=200000 100000 cpu.max.burst=0
cpu_per_req_ms=160 p50=20.4 p90=21.0 p99=28.1 max=30.2
usage_usec 32079305
nr_periods 342
nr_throttled 0
throttled_usec 0
nr_bursts 0
burst_usec 0
== q1cpu-p10ms rep=1 threads=8 work_ms=20 load=8.96
cpu.max=10000 10000 cpu.max.burst=0
cpu_per_req_ms=160 p50=154.5 p90=160.8 p99=164.8 max=167.2
usage_usec 32081883
nr_periods 3543
nr_throttled 3086
throttled_usec 136145518
nr_bursts 0
burst_usec 0
== q1cpu-1thread rep=1 threads=1 work_ms=160 load=16.47
cpu.max=100000 100000 cpu.max.burst=0
cpu_per_req_ms=160 p50=164.5 p90=181.2 p99=198.8 max=204.3
usage_usec 32015991
nr_periods 635
nr_throttled 0
throttled_usec 0
nr_bursts 0
burst_usec 0
== unlimited rep=2 threads=8 work_ms=20 load=21.94
cpu.max=max 100000 cpu.max.burst=0
cpu_per_req_ms=160 p50=93.5 p90=121.9 p99=171.4 max=178.4
usage_usec 32050031
nr_periods 0
nr_throttled 0
throttled_usec 0
nr_bursts 0
burst_usec 0
== q1cpu rep=2 threads=8 work_ms=20 load=35.14
cpu.max=100000 100000 cpu.max.burst=0
cpu_per_req_ms=160 p50=73.1 p90=108.8 p99=145.0 max=154.7
usage_usec 32078907
nr_periods 443
nr_throttled 183
throttled_usec 57133198
nr_bursts 0
burst_usec 0
== q1cpu-burst rep=2 threads=8 work_ms=20 load=22.01
cpu.max=100000 100000 cpu.max.burst=100000
cpu_per_req_ms=160 p50=20.7 p90=43.0 p99=74.5 max=77.2
usage_usec 32076718
nr_periods 353
nr_throttled 43
throttled_usec 4513882
nr_bursts 190
burst_usec 9714570
== q2cpu rep=2 threads=8 work_ms=20 load=17.56
cpu.max=200000 100000 cpu.max.burst=0
cpu_per_req_ms=160 p50=66.1 p90=112.3 p99=140.5 max=152.7
usage_usec 32062338
nr_periods 424
nr_throttled 0
throttled_usec 0
nr_bursts 0
burst_usec 0
== q1cpu-p10ms rep=2 threads=8 work_ms=20 load=26.40
cpu.max=10000 10000 cpu.max.burst=0
cpu_per_req_ms=160 p50=158.0 p90=166.9 p99=196.3 max=201.6
usage_usec 32066544
nr_periods 3545
nr_throttled 2752
throttled_usec 79910609
nr_bursts 0
burst_usec 0
== q1cpu-1thread rep=2 threads=1 work_ms=160 load=40.74
cpu.max=100000 100000 cpu.max.burst=0
cpu_per_req_ms=160 p50=160.9 p90=162.0 p99=165.6 max=182.4
usage_usec 32019798
nr_periods 622
nr_throttled 0
throttled_usec 0
nr_bursts 0
burst_usec 0
== unlimited rep=3 threads=8 work_ms=20 load=19.38
cpu.max=max 100000 cpu.max.burst=0
cpu_per_req_ms=160 p50=20.4 p90=22.0 p99=37.7 max=40.5
usage_usec 32082748
nr_periods 0
nr_throttled 0
throttled_usec 0
nr_bursts 0
burst_usec 0
== q1cpu rep=3 threads=8 work_ms=20 load=14.52
cpu.max=100000 100000 cpu.max.burst=0
cpu_per_req_ms=160 p50=68.2 p90=106.6 p99=109.6 max=111.9
usage_usec 32076825
nr_periods 432
nr_throttled 193
throttled_usec 66057127
nr_bursts 0
burst_usec 0
== q1cpu-burst rep=3 threads=8 work_ms=20 load=9.88
cpu.max=100000 100000 cpu.max.burst=100000
cpu_per_req_ms=160 p50=20.9 p90=41.0 p99=81.4 max=100.3
usage_usec 32072589
nr_periods 353
nr_throttled 39
throttled_usec 3743643
nr_bursts 190
burst_usec 9823441
== q2cpu rep=3 threads=8 work_ms=20 load=11.40
cpu.max=200000 100000 cpu.max.burst=0
cpu_per_req_ms=160 p50=65.1 p90=123.6 p99=171.2 max=177.7
usage_usec 32060472
nr_periods 430
nr_throttled 0
throttled_usec 0
nr_bursts 0
burst_usec 0
== q1cpu-p10ms rep=3 threads=8 work_ms=20 load=23.44
cpu.max=10000 10000 cpu.max.burst=0
cpu_per_req_ms=160 p50=157.1 p90=165.5 p99=176.1 max=213.5
usage_usec 32061943
nr_periods 3537
nr_throttled 2805
throttled_usec 82393461
nr_bursts 0
burst_usec 0
== q1cpu-1thread rep=3 threads=1 work_ms=160 load=31.46
cpu.max=100000 100000 cpu.max.burst=0
cpu_per_req_ms=160 p50=160.7 p90=161.2 p99=162.7 max=163.5
usage_usec 32018927
nr_periods 622
nr_throttled 0
throttled_usec 0
nr_bursts 0
burst_usec 0

The nested run builds the ancestor case in its simplest form: a pod cgroup with a quota and a ctr child at max, standing in for a container whose own quota is not the one that runs out. It needs the scope to give up its own process first, because cgroup v2 does not let a cgroup with processes enable controllers for its children.

nested.sh: pod cgroup with a quota, container cgroup without oneshell
#!/bin/bash
# usage: nested.sh POD_MAX CTR_MAX -- command...
set -euo pipefail
CG=/sys/fs/cgroup$(sed -n 's/^0:://p' /proc/self/cgroup)
mkdir "$CG/shell"; echo $$ > "$CG/shell/cgroup.procs"
echo +cpu > "$CG/cgroup.subtree_control"
mkdir "$CG/pod"; echo "$1 100000" > "$CG/pod/cpu.max"
echo +cpu > "$CG/pod/cgroup.subtree_control"
mkdir "$CG/pod/ctr"; echo "$2 100000" > "$CG/pod/ctr/cpu.max"
shift 3
snap() { for l in pod pod/ctr; do
  awk -v l=$l '/nr_periods|nr_throttled|throttled_usec/ {print l".stat."$1, $2}' "$CG/$l/cpu.stat"
  awk -v l=$l '{print l".local."$1, $2}' "$CG/$l/cpu.stat.local"
done; }
BEFORE=$(mktemp); AFTER=$(mktemp)
snap > "$BEFORE"
( echo $BASHPID > "$CG/pod/ctr/cgroup.procs"; exec "$@" )
snap > "$AFTER"
paste "$BEFORE" "$AFTER" | awk '{printf "%-30s %d\n", $1, $4-$2}'
rm -f "$BEFORE" "$AFTER"
Run the nested caseshell
chmod +x nested.sh
systemd-run --user --scope --quiet -p Delegate=yes ./nested.sh 100000 max -- ./fanout 8 20 200 100
nested.sh output on the lab machine (one of two runs)text
cpu_per_req_ms=160 p50=66.3 p90=104.8 p99=108.9 max=109.7
pod.stat.nr_periods            431
pod.stat.nr_throttled          191
pod.stat.throttled_usec        65807154
pod.local.throttled_usec       65807154
pod/ctr.stat.nr_periods        0
pod/ctr.stat.nr_throttled      0
pod/ctr.stat.throttled_usec    0
pod/ctr.local.throttled_usec   65807154

What the lab does not cover: it runs on one socket, so it says nothing about the cost of the unthrottle IPIs across NUMA nodes; it runs a synthetic CPU loop with almost no time in the kernel, so it cannot show the overrun that task-based throttling allows for syscall-heavy code; and it measures one group alone. Each of those is worth its own experiment before a fleet-wide change.

Requests, limits and what we set

Requests and limits use different kernel mechanisms and should be judged separately. A CPU request becomes a weight. The kubelet computes shares as milliCPU * 1024 / 1000 and the OCI runtime converts shares to the cgroup v2 cpu.weight range of [1, 10000], default 100 61. That conversion changed. In opencontainers/cgroups v0.0.1 it was linear, 1 + ((shares - 2) * 9999) / 262142, which maps a one-CPU request of 1024 shares to weight 39, well below the default of 100 that an unconfigured cgroup gets 19. From v0.0.3 the weight is 10 raised to a quadratic in log2(shares), ceil(10^((l*l + 125*l)/612 - 7/34)) with l = log2(shares), which maps 2 to 1, 1024 to 100 and 262144 to 10000 20; v0.1.0 computes it the same way 21, and runc adopted it in 1.4.0, whose changelog describes the conversion as improved to better fit default v1 and v2 values 22. A node upgrade that changes the runtime version therefore changes the relative weight of pods against anything left at the default, with no change in any manifest.

Weights are work-conserving: they matter only when CPUs are contended, and an idle node lets a pod with a small request use every core. A limit is not work-conserving. It stops the group on an idle node, and as shown above it stops parallel work far earlier in wall time than the average suggests. That asymmetry is the core of my position: on a node where requests are set honestly, the weight already protects neighbours under contention, and a CPU limit mostly buys latency in exchange for a guarantee nobody needed.

There are three good reasons to keep limits anyway. A Guaranteed QoS class needs limits equal to requests, and with the static CPU manager policy and an integer request that class buys exclusive CPUs. Since 1.33 the kubelet disables the CFS quota for containers with exclusive CPUs, which removes the problem for those containers outright; the gate DisableCPUQuotaWithExclusiveCPUs is deprecated and locked to on in 1.37 8. Second, multi-tenant clusters need a ceiling that a tenant cannot negotiate with, and a weight is not one. Third, capacity tests are only meaningful if a pod cannot borrow idle CPU that will not be there in production.

If a limit stays, size it for the burst, not for the average: the CPU a request needs divided by the period must fit the quota, or the request will straddle a refill. Set the runtime's parallelism to the limit. Go 1.25 does this by default on Linux: GOMAXPROCS defaults to the cgroup CPU bandwidth limit when it is lower than the logical CPU count, ignores requests, and is updated periodically when the limit changes, unless GOMAXPROCS is set explicitly or GODEBUG=containermaxprocs=0 is used 23. The periodic update matters because in-place pod resize is GA since 1.35 8, so cpu.max can change under a running process. Prefer the default 100 ms period for fan-out workloads; the gate that lets you shorten it is GA, but a shorter period trades parallel capacity for smoothness, which is the wrong trade for anything that fans out. And alert on throttled_usec in cpu.stat.local for the container, not only on the ratio in cpu.stat.

Where manifests reach clusters through Argo CD, as ours do, each of these numbers is a reviewed change in Git, which is the right place for a scheduling contract with a 100 ms clock inside it.

المراجع

  1. Control Group v2, CPU interface files (Documentation/admin-guide/cgroup-v2.rst at v7.2) Linux kernel
  2. kernel/sched/core.c at v7.2: tg_set_bandwidth, tg_set_cfs_bandwidth, __cfs_schedulable, tg_cfs_schedulable_down, cpu_extra_stat_show, cpu_local_stat_show Linux kernel
  3. CFS Bandwidth Control (Documentation/scheduler/sched-bwc.rst at v7.2) Linux kernel
  4. kernel/sched/sched.h at v7.2: struct cfs_bandwidth, struct cfs_rq, walk_tg_tree Linux kernel
  5. Resource Management for Pods and Containers Kubernetes documentation
  6. pkg/kubelet/cm/helpers_linux.go at v1.37.2: MilliCPUToQuota, MilliCPUToShares, ResourceConfigForPod Kubernetes
  7. pkg/kubelet/kuberuntime/kuberuntime_container_linux.go at v1.37.2: calculateLinuxResources Kubernetes
  8. pkg/features/kube_features.go at v1.37.2 Kubernetes
  9. KubeletConfiguration v1beta1 types at v1.37.2: cpuCFSQuota, cpuCFSQuotaPeriod Kubernetes
  10. kernel/sched/fair.c at v7.2: CFS bandwidth accounting, throttling and timers Linux kernel
  11. sched: Async unthrottling for cfs bandwidth (commit 8ad075c2eb1f) Linux kernel
  12. sched/fair: Switch to task based throttle model (commit e1fad12dcb66) Linux kernel
  13. sched/fair: Fix low cpu usage with high throttling by removing expiration of cpu-local slices (commit de53fd7aedb1) Linux kernel
  14. ChangeLog-5.3.9: stable backport 2bd11026299b of de53fd7aedb1 Linux kernel
  15. CFS quotas can lead to unnecessary throttling (issue 67577) Kubernetes
  16. sched/fair: Introduce the burstable CFS controller (commit f4183717b370) Linux kernel
  17. CRI runtime v1 api.proto at v1.37.2: LinuxContainerResources Kubernetes
  18. systemd.resource-control(5): CPUQuota=, CPUQuotaPeriodSec=, Delegate= systemd
  19. utils.go at v0.0.1: ConvertCPUSharesToCgroupV2Value (linear) opencontainers/cgroups
  20. utils.go at v0.0.3: ConvertCPUSharesToCgroupV2Value (10 raised to a quadratic in log2 of shares) opencontainers/cgroups
  21. utils.go at v0.1.0: ConvertCPUSharesToCgroupV2Value (10 raised to a quadratic in log2 of shares) opencontainers/cgroups
  22. runc CHANGELOG at v1.4.0 opencontainers/runc
  23. Go 1.25 Release Notes: container-aware GOMAXPROCS The Go Project

هل تسمح لنا بأن نقيس كيف وصلت إلى هنا؟

نستخدم ملفات تعريف الارتباط التحليلية لنعرف أي صفحة تؤدي عملها وأي إعلان قادك إلى هنا. وإذا رفضت، فسيعمل الموقع تمامًا كما هو ولن نضع أي ملفات تعريف ارتباط تحليلية. سياسة ملفات تعريف الارتباط