Skip to content

docs(k8s): add the Kubernetes performance tuning spec #5444

Closed
2 of 2 issues completed
Closed

Description

@dan-petty

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:

  1. Purpose and scope: the k3s cluster, its nodes and the workloads that the project deploys.
  2. Principles: measure first, one change at a time, keep or revert, record; reliability before cost; standard Kubernetes controls before custom code.
  3. The target with numbers: CPU throttling, OOM kills, restarts, pending time, image pull and start time, node headroom, the Job duration SLO.
  4. The current state, measured with kubectl top and Prometheus for the last 7 days, with the query and the date.
  5. 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.
  6. The rules that agents and jobs follow, each as a link to the document that owns it where one exists.
  7. 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.md exists 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 check and uv run devops ci --check --only lint,format,docs,openspec,domain pass.

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).

Sub-issues

Sub-issues

2 of 2 Issues completed
Loading 2 sub-issues

Activity

  1. added
    source/agent
    type/docs
    scope/k8s
    status/new
    value/medium
    effort/medium
    on Nov 13, 2026
  2. dan-petty commented on Nov 13, 2026

    @dan-petty
    OwnerAuthor
    • Related: docs(ai): add the agentic workflow spec #5443, which asks for a different change. 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.
  3. added
    priority/p2-medium
    owner/agent
    on Nov 13, 2026
  4. dan-petty commented on Nov 13, 2026

    @dan-petty
    OwnerAuthor

    The agentic workflow spec (#5443, PR #5489) names this spec by its issue number, because the file is not on main yet. 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.yml and docs/index.md, so the later ones need a rebase.

  5. added
    status/in-progress
    status/in-review
    and removed
    status/new
    status/in-progress
    on Nov 13, 2026
  6. dan-petty commented on Nov 13, 2026

    @dan-petty
    OwnerAuthor

    Scope change: owner directions of 2026-11-13

    The owner gave three directions for the project specs on 2026-11-13:

    1. Split the details of the current environment from the general guidelines for this project and all managed projects.
    2. Some metrics come from programmatic analysis.
    3. No agent updates each detail of the metric results and of the service layout by hand.

    These directions replace the measured baseline of this item: part 4 of the proposed solution (the current state from kubectl top and 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:

  7. removed
    status/in-review
    owner/agent
    on Nov 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    effort/mediumpriority/p2-mediumscope/k8ssource/agenttype/docsvalue/medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions