Repository navigation
fix(chart): the node agent keeps its 200m CPU request, drops its CPU limit, and pins GOMAXPROCS=2 (#1116) - #1119
Merged
Merged
Conversation
…limit, and pins GOMAXPROCS=2 (#1116) Snapshot builds are 5-25 ms CPU bursts on the ODCDS/EDS path. Under a 200m CFS quota they became 100 ms steps and a goroutine could be throttled while holding the snapshot-cache mutex (#1105/#1114). The agent pod is now Burstable rather than Guaranteed; an operator who needs Guaranteed sets limits.cpu = requests.cpu >= 1000m. GOMAXPROCS was derived from limits.cpu via resourceFieldRef, which falls back to node allocatable once the limit is gone (and the Go >= 1.25 runtime would likewise scale to the node's cores). It is now an explicit env from the new agent.goMaxProcs value (default 2); 0/empty omits it. Chart 2.1.1 -> 2.1.2. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr
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 #1116
What
agent.resourcesdefault:requests: {cpu: 200m, memory: 64Mi},limits: {memory: 64Mi}; nolimits.cpu. Memory request = limit is unchanged.agent.goMaxProcs(default2) is rendered as the agent container'sGOMAXPROCSenv var. If it is0or empty, the env var is left out and the Go runtime chooses.GOMAXPROCSthroughresourceFieldRef: limits.cpu, which rounded 200m up to 1. That entry is replaced rather than duplicated. Once the limit is gone, the downward API would fall back to node allocatable, the same as Go ≥ 1.25's own cgroup derivation would. Controller and registrar keep theirresourceFieldRefGOMAXPROCS and their resources; this PR changes neither.Why
Snapshot builds are 5–25 ms CPU bursts on the ODCDS/EDS path. A 200m CFS quota allows 20 ms of CPU per 100 ms period, so those builds became 100 ms steps, and a goroutine could be throttled while holding the snapshot-cache mutex (#1105/#1114).
Trade-off: the agent pod becomes QoS Burstable instead of Guaranteed. An operator who needs Guaranteed sets
limits.cpuequal torequests.cpuand raises both to at least1000m. Pairing that withagent.goMaxProcs=0lets the runtime follow the limit again.Effective GOMAXPROCS goes from 1 (the ceil of 200m) to 2.
Tests
aether_agent_cpu_resources_test: checks the agent container's resources by position.limitsholds only memory andrequests.cpu: 200m, followed byvolumes:, so the cni-install initContainer cannot satisfy it. It also checksGOMAXPROCSvalue: "2". Red on main's chart (both patterns missing), green here.aether_agent_gomaxprocs_off_test(helm_template_absent_test): withagent.goMaxProcs=0,agent-daemonset.yamlrenders noname: GOMAXPROCS. The control string isname: GOMEMLIMIT.bazel test //charts/aether:all: 45/45 pass.make formatis clean, andbazel build --config=lint --@aspect_rules_lint//lint:fail_on_violation //...passes.Docs
docs/configuration.mdcovers theagent.resourcesrow (Burstable, the ≥1000m guidance) and the newagent.goMaxProcsrow.docs/runbook.mdnever says the agent is Guaranteed or has a 200m limit, so it is unchanged.After deploy (talos)
kubectl -n aether get pods -l app.kubernetes.io/name=aether-agent -o custom-columns=NAME:.metadata.name,QOS:.status.qosClassshould showBurstable.GOMAXPROCS=2.aether.agent.snapshot.set_durationand build wall-clock p99 before and after, plus first-use (quic: a new pod's first use of many QUIC destinations at once exceeds the 2 s on_demand timeout (503 NC burst at loader start) #1086) and drain-propagation (eds: a source proxy still picks an endpoint 3.4–3.8 s after the destination agent marked it DRAINING (the requests behind #1087's 504s) #1103) timings.🤖 Generated with Claude Code
https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr