Repository navigation
Description
Problem Description
On 2026-11-12 the owner said that the cluster limits look unnecessarily low. 7 days of Prometheus data show that some memory limits are near the peak use, and that some CPU limits throttle the container. Each limit is fixed today only after a kill (#4116, #4149, #2806, #1815, #2391, #4939). This item is rank 1 of the cluster integration plan #4989. It is a configuration fix that ships now and needs no owner step.
Reproduction Steps
- In Prometheus, read
max_over_time(container_memory_working_set_bytes[7d])andkube_pod_container_resource_limits{resource="memory"}for each container below. - Read
rate(container_cpu_cfs_throttled_periods_total[7d]) / rate(container_cpu_cfs_periods_total[7d])for the exporters and the Service. - Compare with the values in git (file and line in the table below).
Expected vs Actual Behavior
Expected: each memory limit has room above its 7 d peak, and a CPU limit does not throttle a container that uses a few millicores.
Actual (7 d to 2026-11-12):
- Grafana peaked at 1014 MiB of its 1024Mi limit (99 %).
- The LLM gateway serves every model call. It grows from 659 to 1333 MiB in 4 days between rollouts (65 % of 2048Mi, about +170 MiB a day).
- alloy-logs is at 67 % of 512Mi and rising. alloy-metrics peaks at 72 % of 1024Mi.
- The redis_exporter sidecars use 11 to 19 millicores, but CFS throttles them in 57 to 73 % of periods. node-exporter is throttled in 29 to 31 % of periods. Their scrapes take 0.26 to 2.0 s, against 0.04 s for a target that is not throttled.
- roadmap-service reaches 1.00 core at its 1-core limit. It has one event loop, so the gain is for subprocess and native-thread bursts only.
Limits are not reserved on the node, and node memory use is 18 to 30 %. So the raises cost no scheduling room.
Proposed Fix
One pull request. Requests stay the same, except the Grafana memory request.
| Container | File and line | Now | New |
|---|---|---|---|
| grafana memory | k8s/monitoring/grafana-values.yaml 17-23 |
request 256Mi, limit 1024Mi | request 512Mi, limit 2Gi |
| llm-gateway memory | k8s/llm/gateway/deployment.yaml 126 |
2048Mi | 4Gi |
| alloy-metrics memory | k8s/monitoring/k8s-monitoring-values.yaml 356 |
1024Mi | 1536Mi |
| alloy-logs memory | k8s/monitoring/k8s-monitoring-values.yaml 385 |
512Mi | 768Mi |
| redis_exporter CPU | k8s/llm/valkey.yaml 138, k8s/llm/valkey-devops.yaml 138, k8s/argocd/values.yaml 99 |
100m | 500m |
| node-exporter CPU | k8s/monitoring/k8s-monitoring-values.yaml 308 |
200m | 500m |
| roadmap-service CPU | k8s/devops/roadmap-service/deployment.yaml 139 |
1 | 2 |
- Tempo stays at 2Gi (7 d peak 76 %). The near-limit rule of dan-petty/homelab#344 watches it.
- Do not set
MAX_REQUESTS_BEFORE_RESTARTon the gateway. With one uvicorn worker and one replica, every model call fails until the container restarts. - Put the before values in a pull-request comment: the 7 d peak against the limit, the throttled share, and the Service event-loop lag or round time.
Environment Diagnostics
Homelab k3s cluster, Argo CD syncs main. Data: Prometheus (cAdvisor and kube-state-metrics) for the 7 d to 2026-11-12. Study: read-only kubectl get, describe and top.
Acceptance Criteria
- Git holds the values of the table, and
tests/invariants/test_k8s_*.pyand kubeconform pass. - A pull-request comment records the before values.
- 7 d after the merge, a second comment records the peak against the new limit and the throttled share for each container.
Dependencies
None. dan-petty/homelab#344 (workload alerts) and #4992 (KRR) come after this item.
Source: #4989
Activity
dan-petty commentedon Nov 12, 2026
Both raise a roadmap-service resource limit, but dan-petty/devops-cli#4149 fixes its memory limit after OOM kills while the candidate raises its CPU limit (1 to 2) among seven other containers.devops-cli-service commentedon Nov 12, 2026
Released in v0.118.0: https://github.com/dan-petty/devops-cli/releases/tag/v0.118.0
devops-cli-service commentedon Nov 12, 2026
Live since 2026-11-12 12:40 UTC
dan-petty commentedon Nov 12, 2026
Open criterion: the comment 7 days after the merge
This issue closed when #5030 merged (2026-11-12T12:09:50Z), but the third acceptance criterion is still open: "7 d after the merge, a second comment records the peak against the new limit and the throttled share for each container."
servicethrottled share, node-exporter scrape time). The peaks and throttled shares of the other containers are in the evidence comment of fix(k8s): raise the limits that 7 d of use shows are too low #5030.2026-11-19T12:09:50Z, and post the values beside the baseline on fix(k8s): raise the limits that 7 d of use shows are too low #5030.