Repository navigation
Description
Problem or Motivation
The owner asked on 2026-11-13 for three project specs: SRE service implementation, Kubernetes performance tuning, and agentic workflow implementation and tuning. This item is the second spec.
The facts and the rules about the performance of the cluster and its workloads are in many places today: the runner sizes and the QoS classes in the manifests and k8s/README.md, the GPU tiers and the model placement in docs/CLUSTER.md, the pids and memlock limits of the dev host in the devcontainer documents, the runtime and gVisor work in open issues, and owner decisions that are only in issues or chat (double the limits of a job under 80 % success, traverse configuration values until a job works, then tune down for cost; never exec into a pod near its memory limit; the eBPF profiler is suspected in a node crash). No document states the target with numbers, the current state as measured, one tuning method, the queries that measure each area, and the gaps with their issues. So an agent that changes a request, a limit, a placement or a runtime does not know what "good" is, how to measure the change, or which gap already has an issue.
Proposed Solution
Add docs/K8S_PERFORMANCE.md, a normative spec in the form of docs/DESIGN.md:
- Purpose and scope: the k3s cluster, its nodes and the workloads that the project deploys.
- Principles: measure first, one change at a time, keep or revert, record; reliability before cost; standard Kubernetes controls before custom code.
- The target with numbers: CPU throttling, OOM kills, restarts, pending time, image pull and start time, node headroom, the Job duration SLO.
- The current state, measured with
kubectl topand Prometheus for the last 7 days, with the query and the date. - The method and the areas: requests, limits and QoS classes; node capacity and placement; container runtimes; image pull and start time; storage; network paths; cgroup and pids limits; kubelet eviction; the control plane and the controllers; Valkey and databases; profiling and the eBPF risk. Each area gives the Prometheus query that measures it.
- The rules that agents and jobs follow, each as a link to the document that owns it where one exists.
- A gap table: each gap with an existing issue or "new issue needed".
Register the document in the docs inventory and its test, the docs site and docs/index.md, and link it from the documents that route to it.
Acceptance Criteria
-
docs/K8S_PERFORMANCE.mdexists with the seven parts above, in ASD-STE100, with no host name, node name, address, domain or local path. - Each measured number gives its query and its date.
- Each rule that another document owns is a link, not a copy.
-
uv run devops docs checkanduv run devops ci --check --only lint,format,docs,openspec,domainpass.
Target Subsystem
Kubernetes & Minikube Automation
Existing Tool Considered
The spec is a document, not code. It uses the tools that the cluster has: kubectl top, Prometheus with kube-state-metrics and cAdvisor, and Grafana. It cites the primary sources: the Kubernetes documentation (resource management, QoS classes, node-pressure eviction, RuntimeClass, scheduling), the k3s documentation, the Argo Workflows and Argo CD documentation, and the Google SRE book and workbook. Cost to write (estimate): 0.6 M tokens and 2 hours. Keep: one update for each changed limit, placement or measurement. Fix: about 0.05 M tokens for each wrong rule.
Related
#5443 (agentic workflow spec), #5440 (attempt limits as settings), #3727 (classify OOM kills), docs/DESIGN.md (the form of the spec).
Activity
dan-petty commentedon Nov 13, 2026
Both are specs from the same owner request on 2026-11-13; this item is the second spec (Kubernetes performance tuning) and dan-petty/devops-cli#5443 is the third spec (agentic workflow), so they are siblings with different scope and different output documents.dan-petty commentedon Nov 13, 2026
The agentic workflow spec (#5443, PR #5489) names this spec by its issue number, because the file is not on
mainyet. When this spec merges, please change the references to #5443, #5444 and #5445 in the merged specs to links to the files. The three pull requests also edit the same lines of.nav.ymlanddocs/index.md, so the later ones need a rebase.dan-petty commentedon Nov 13, 2026
Scope change: owner directions of 2026-11-13
The owner gave three directions for the project specs on 2026-11-13:
These directions replace the measured baseline of this item: part 4 of the proposed solution (the current state from
kubectl topand Prometheus, with the query and the date) and the criterion "Each measured number gives its query and its date".The new scope of PR #5492:
docs/guidelines/kubernetes.md. Each target names the kubernetes-mixin alert (#4993), the KRR report (feat(k8s): size every container from Prometheus history with KRR #4992) or the kube-linter check (fix(ci): validate the k8s manifests against a schema in CI #5084) that measures it. The guideline holds no measured number, no read date, no issue number and no node.k8s/README.md.devops infra statusgives the node facts (comment on feat(infra): manage infra repos with devops infra #5120),devops infra driftgives the kubelet settings (feat(infra): report drift of an infra repo #5127), and the project review reads the queries as facts (comment on feat(roadmap): read project review facts through a catalog #4692).tests/docs/test_k8s_performance_spec.pyrequires a dated measured row, which is the opposite of direction 3. The new testtests/invariants/test_guidelines.pyreplaces it.docs/guidelines/index.mdand one AGENTS.md row that routes to it.docs(k8s): add the Kubernetes performance tuning spec