Repository navigation
Description
Problem
A runner Job requests the memory of its size row (2Gi or 6Gi, src/devops_cli/roadmap/implement/implement_size.py), and its limit is the setting roadmap.implement.max_memory_limit (16Gi). The scheduler places a pod by its request only. So a Job can go to a node that cannot hold its limit, and a Job that grows past its request takes memory from the other pods of the node and from the k3s server. #5485 planned a node label and a required node affinity for this, with a homelab play that sets the label (dan-petty/homelab#302).
The owner decided on 2026-11-27: use the standard Kubernetes form, with no custom node label. Memory is not compressible, so the Kubernetes guidance for memory is a request equal to the limit. Then the scheduler keeps each Job off a node with too little free allocatable memory, and a Job cannot burst past what it reserved. dan-petty/homelab#302 is closed as not planned.
Measured on 2026-11-27 (Prometheus, 14 days, container agent of namespace devops, 41 pods): the highest working set of a pod is 4.54 GiB; the 95th percentile of the per-pod peaks is 4.42 GiB. The limit of 16Gi is 3.5 times the highest peak.
Change
- The memory limit of each runner Job equals its memory request. Each size row of
RUNNER_SIZESgives both, from its measured peak with headroom (the row already recordspeak_bytes). - Remove the setting
roadmap.implement.max_memory_limit, or keep it only as an upper bound that the validator checks against the rows. Keep the admission policyroadmap-service-jobsand its gate check equal to the rows. - Correct
docs/CLUSTER.md,docs/CONFIGURATION.mdanddocs/ENV_VARS.md. - Before the change, measure the peak of each row: join the working set with the memory request of each pod (kube-state-metrics), and set each row above its own peak.
Done when
- A runner Job that the Service builds has a memory request equal to its memory limit, and the admission policy admits it.
- On the cluster, no runner pod is placed on a node whose free allocatable memory is below its limit (the scheduler gives
Insufficient memoryfor such a node). - No runner Job of the next 7 days ends with
OOMKilled.
Replaces #5485.
Alternatives check of 2026-11-27: none.
Tool: none found.
Reason: Searches returned only unrelated pages and no open tool that sets a Job's memory limit from the project's RUNNER_SIZES rows. The change lives in the project's own Job template and admission policy, so nothing external covers it.
Lacks:
- Per-size-row memory request and limit from measured peak
- Removal or bounding of roadmap.implement.max_memory_limit
- Admission policy gate and docs kept equal to the rows
Activity
devops-cli-service commentedon Nov 27, 2026
The result in the alternatives block of the issue body changed. Before this check: no check. A person decides what the new result means for the item.
Searches (8)
Tools considered:
Searches run:
Sources:
feat(roadmap): set each runner Job memory limit to its request
docs(spec): archive 7422-runner-memory-limit-equals-request
test(roadmap): the deadline test reads the memory limit of the row
feat(roadmap): set each runner Job memory limit to its request
docs(spec): archive 7422-runner-memory-limit-equals-request
test(roadmap): the deadline test reads the memory limit of the row
test(roadmap): launch creates the Job that runner_job builds
dan-petty commentedon Nov 27, 2026
Correction of the measurement in this body: the container
agentexists only since 2026-11-22 (the three-container Job). In the same 14 days, Jobs that ran the agent step in the one containerrunnerreached 8.05 GiB (confirmed withmax(max_over_time(container_memory_working_set_bytes{namespace="devops",container="runner"}[14d]))). So 6Gi does not hold the large row. Pull request 7432 sizes the rows from all these Jobs: 5Gi and 11Gi, each with limit equal to request, at most 80 % of the limit at the peak.devops-cli-service commentedon Nov 27, 2026
Released in v0.227.0: https://github.com/dan-petty/devops-cli/releases/tag/v0.227.0
devops-cli-service commentedon Nov 27, 2026
Live since 2026-11-27 18:39 UTC