Sizing Agents

Sizing Agents for a Four-CPU Host

More executors than CPUs run the same work slower, not faster. These docker stats peaks come from dk-inside and k8s-pod on this shared 4-CPU machine, so compare ratios rather than absolutes:

Peak usage of BookNest's controller and agents during two builds
Container Peak CPU Peak memory Limit set
l2-jenkins (controller) 44% 987 MiB none
l2-agent-ssh (running inside) 32% 143 MiB 2 CPUs, 2 GiB
node:24-slim build container 98% 59 MiB 1 CPU, 1 GiB
l2-agents-control-plane (kind node and pod) 196% 1,220 MiB none

The kind node is the expensive part. This controller keeps zero executors on the built-in node and one per CPU an agent may use (agent-ssh has two and --cpus 2), limits every build container and pod so a runaway test is killed instead of swapping the host, caps concurrent pods, and stops what is idle: the kind cluster, agent-ws and the dockerfile image were removed once this section's builds were done.