You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
kernel: CONFIG_CFS_BANDWIDTH is off, so cpu.max cannot cap an execution #1193
An adapter that runs sandboxed executions in the guest can cap memory.max and pids.max of an execution's cgroup but not its CPU time: the kernel in kernel/config-microvm has # CONFIG_CFS_BANDWIDTH is not set, so writing cpu.max fails.
Why this might matter here
#912 discusses the cost of one cgroup per execution and the limits of one cgroup for all executions. A per-execution CPU cap would need cpu.max, which needs this option. I did not find an issue or PR that asks for it (searched cpu.max, CFS, CPU limit cgroup).
Evidence (one machine, an external adapter, not the upstream agent)
With a kernel built from the same 6.18.38 sources and patches plus CONFIG_CFS_BANDWIDTH=y, a guest agent that writes cpu.max into an execution's cgroup limited a busy loop to 0.51 CPU for a 50 % limit (1.00 CPU with no limit). With the upstream release kernel the same request fails at start. I have not measured the size or boot-time cost of the option.
Proposal
Enable the option (one line, PR follows). Whether the upstream managed agent should expose cpu.max is a separate question; I am not asking for that here.
Closing as not planned: this will not be implemented, because it goes away with the nvx refactor (feature/nvx-refactor). #1299 and #1300, which implemented it, are closed too. Thanks for the report and the measurements.
Activity
test-microvm: cap a busy loop with cpu.max
test-microvm: cap a busy loop with cpu.max
ppenna commentedon Nov 6, 2026
Closing as not planned: this will not be implemented, because it goes away with the nvx refactor (
feature/nvx-refactor). #1299 and #1300, which implemented it, are closed too. Thanks for the report and the measurements.