Skip to main content

cgroup_max_tasks

Function cgroup_max_tasks 

Source
pub fn cgroup_max_tasks() -> Option<usize>
Expand description

Returns the cgroup task-count limit applying to this process.

Container runtimes impose a task ceiling through the cgroup v2 pids controller, which RLIMIT_NPROC does not reflect: Podman defaults to 2,048 tasks while leaving the rlimit unbounded. The effective ceiling is the lowest limit set anywhere in the cgroup’s ancestry, so every ancestor is read; None means none of them sets one, which also covers a cgroup v1 hierarchy.