Repository navigation
fix(chart): mesh-dns 50m CPU request, no CPU limit, GOMAXPROCS=2 (#1253) - #1260
Merged
Merged
Conversation
mesh-dns is every managed pod's resolver and was CFS-throttled at steady state: 25m request / 100m limit, ~24.5m average usage, 8.7 % of periods throttled on a live talos node. Drop the default CPU limit (same call as the agent in #1116) and raise the request to 50m, its CFS weight under contention. Pin GOMAXPROCS=2 (agent.meshDnsDaemon.goMaxProcs), which is what the Go runtime derived from the old 100m limit, so the daemon does not scale its Ps and GC workers to the node's cores. An empty limits.cpu is dropped rather than rendered as `cpu: ""`. Memory unchanged; this container sets no GOMEMLIMIT. QoS stays Burstable. Chart 2.4.7. Docs: configuration.md rows and a runbook section on measuring mesh-dns throttling. Closes #1253 Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr
Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr
bpalermo
force-pushed
the
fix/1253-mesh-dns-cpu
branch
from
October 5, 2026 15:31
9572d3f to
5dd7b5e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1253
What
mesh-dns is every managed pod's resolver and was CFS-throttled at steady state (25m request / 100m limit; ~24.5m average usage;
nr_throttled 16851 / nr_periods 193397= 8.7 % on w05). This PR:agent.meshDnsDaemon.resources). Same pattern as the agent (agent: the 200m CPU limit turns 5–25 ms snapshot builds into 100 ms CFS steps and parks goroutines holding the cache mutex — remove the limit (or ≥1000m) and pin GOMAXPROCS #1116) and the authz sidecar: request = scheduling reservation + CFS weight, no quota on a latency-critical path.GOMAXPROCS=2via a newagent.meshDnsDaemon.goMaxProcs(same shape asagent.goMaxProcs). Go 1.25+ derives GOMAXPROCS from the CPU limit with a floor of 2, so under the old 100m limit the daemon already ran with 2 Ps. Without a limit it would scale to the node's cores, and the GC's background workers (25 % of Ps) with it, for a process whose work is a map lookup or a UDP round trip. Pinning 2 keeps today's runtime behaviour exactly.0/empty omits the env var.limits.cpurenders no limit. The template now drops empty or null quantities instead of renderingcpu: "", which the apiserver rejects. Non-map keys such asclaimspass through.aether.goMemLimit), so nothing there changes.2.4.6 -> 2.4.7.Rendered resources
Before (2.4.6):
After (2.4.7):
Tests
New
helm_template_tests incharts/aether/BUILD.bazel:aether_mesh_dns_cpu_resources_test: default has no cpu limit, request 50m,GOMAXPROCS "2". Red against origin/main's chart, green after.aether_mesh_dns_empty_cpu_limit_test:--set ...limits.cpu=renders no cpu limit. Red before (it renderedcpu: ""), green after.aether_mesh_dns_cpu_limit_override_test:--set ...limits.cpu=200mstill caps it.Proof run locally:
bazel test //charts/...: 70/70 pass.//agent/internal/proxy/hotrestart:hotrestart_testalso passes; it is the only non-chart test that readsvalues.yaml.bazel build --config=lint --@aspect_rules_lint//lint:fail_on_violation //...: clean.make format-check: rc 0.Docs:
docs/configuration.mdgets rows foragent.meshDnsDaemon.resourcesandagent.meshDnsDaemon.goMaxProcs.docs/runbook.mdgets a new section, mesh-dns CPU throttling, covering why (resolver tail latency) and how to measure it.Post-deploy measurement (talos, before/after)
Run the before set on the current release, deploy 2.4.7, wait at least 1h, then run the after set.
cgroup counters (the image is distroless, so read them through a node debug pod):
Expected after:
cpu.max=max 100000, andnr_throttled/throttled_usecstay at 0. The number to compare is thencpu.pressuresome avg10/avg60, which captures waits from node contention as well as from the quota. Also compareusage_usec / pod agefor average CPU.Rendered spec check:
kubectl get ds -n aether-system aether-mesh-dns -o jsonpath='{.spec.template.spec.containers[0].resources}{"\n"}{.spec.template.spec.containers[0].env[?(@.name=="GOMAXPROCS")].value}{"\n"}'PromQL (via the grafana datasource uid
prometheus). The cAdvisor queries only work if kubelet cAdvisor is scraped:Compare the same 1h window shape before and after, at similar load. The expected change is in the tail, not the median.
🤖 Generated with Claude Code
https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr