Repository navigation
Description
Summary
The proxy pod's readiness probe re-executes the entire agent binary every 2 seconds, per pod, forever — just to check whether a marker file exists. Continuous profiling of the running fleet shows ≥31% of all supervisor CPU is Go process-startup overhead, and essentially none of it is the readiness check itself.
From the proxy pod spec:
readinessProbe:
exec:
command:
- /opt/aether/supervisor
- proxy-supervisor
- --readiness-check
- --ready-marker=/var/run/aether-proxy/ready
periodSeconds: 2Measurement
Pyroscope, {service_name="aether-proxy", process_executable_name="supervisor"}, 2026-09-04 07:05–07:30Z, during a soak with zero proxy rolls and zero container restarts in the window — so this is steady-state cost, not startup noise:
| frame | % of supervisor CPU |
|---|---|
runtime.main |
20.27% |
runtime.doInit1 (package init) |
19.75% |
SchemeBuilder.AddToScheme |
14.81% |
do_mem_abort / do_page_fault (cold page-in) |
13.73% / 13.41% |
scheme.init |
11.32% |
gcBgMarkStartWorkers |
10.84% |
Scheme.AddKnownTypes |
8.87% |
apiutil.init |
8.19% |
Scheme.AddKnownTypeWithName |
7.03% |
protobuf filedesc/filetype Build |
~4–5% |
cobra.(*Command).ExecuteContext |
0.52% |
That last row is the point: the work the probe actually exists to do is ~0.5pp. Everything above it is Go runtime boot, controller-runtime scheme registration, protobuf descriptor-registry construction, and cold page faults — paid ~3,750 times per 25 minutes (5 pods × 750 execs), at roughly 6.7ms per exec in main() alone, ~10ms including per-process GC worker spin-up.
Conservative total: runtime.main (20.27%) + gcBgMarkStartWorkers (10.84%) = ≥31% of supervisor CPU is pure process-launch waste, and doInit1 at 19.75% of that 20.27% means almost all of the probe's main() is package init.
Absolute cost is modest — the supervisor is ~0.083 fleet cores, so the waste is ~0.026 cores (~0.5% of one core per node) — but it is the dominant term in the supervisor's budget, it is entirely avoidable, and it scales with pod count.
The fix constraint that matters
Guarding --readiness-check early inside main() will NOT fix this. The expensive work is package-level init() — scheme.init, apiutil.init, the protobuf registry — which the Go runtime executes before main() is entered, regardless of arguments. Options that actually work:
- Replace the exec probe with
httpGetortcpSocketagainst something the supervisor already serves. Cheapest by far, and removes the exec entirely. Preferred if a suitable endpoint exists or can be added. - A separate minimal binary for the readiness check (a few KB, no controller-runtime, no protobuf registry), installed alongside the supervisor by the same init container.
- A build-tag split so the readiness path links none of the heavy packages — fiddly, and easy to regress silently when someone adds an import.
Option 1 also eliminates the per-probe fork/exec and page-fault cost, which options 2 and 3 only reduce.
Relationship to other issues
This is the same shape as #646 (the admin probe burning ~40% of supervisor CPU on JSON decode). #647 removed the JSON decode but left the process-launch cost, which is now the larger term.
It also supersedes the premise of #649: that issue predicted writeState/onLiveEpoch would be the top Go frame at ~5% after #647. Measured at max_node_depth=400 with a 0.201% cutoff, writeState, onLiveEpoch, flock, mkdir, Rename and adminProbe are all absent — the prediction is wrong by at least 25×. #649 was pointing at the supervisor's cost from the wrong direction; this is where it actually is.
Note for anyone re-measuring
The supervisor's frames roll up under service_name="aether-proxy" since the workload-identity naming change. k8s_container_name only yields ["authz","proxy"] and cannot separate them. The label that works is process_executable_name="supervisor".
Activity
perf(proxy): replace the readiness probe's 67MB agent re-exec with a …
bpalermo commentedon Sep 5, 2026
Production validation — 8h soak 2026-09-05, rev192 / chart 0.92.0 / a3cde6c
This issue was auto-closed by its PR merge on 2026-09-04T21:33Z, before the build was deployed. Recording the production evidence here so the closure is backed by a measurement.
Behavioural (8h under churn, T0 01:05:51Z → 09:05:51Z, 31 rolls incl. 6 proxy rolls and one agent+proxy+svc-3 TRIPLE):
aether-proxypod across all 6 proxy generations (kubectl get pods -n aether-system -o json→restartCount0 for bothproxyandauthzon the current generation; the 03:32Z and 06:22Z checkpoints recorded 0 for the intervening generations).readiness=["/opt/aether/proxy-ready","--ready-marker=/var/run/aether-proxy/ready"].starting envoy08:05:57.767 →pod ready08:06:15.825 = 18.06s; w05 08:06:22.088 → 08:06:40.208 = 18.12s. TRIPLE (06:05:51Z): 19.50 / 18.09 / 20.97 / 18.87 / 19.27s.pod not ready08:22:16.819 →pod ready08:22:17.446 = 0.627s and w05 08:21:41.249 → 08:21:41.778 = 0.529s, both coincident with a CDS update removing clusters after the 08:20:51Z svc-1 roll. No restart, no SLI impact.mesh_dnsdns_*all zero.Profiling (Pyroscope
process_cpu:cpu:nanoseconds, 07:08:30–07:33:30Z):runtime.main,doInit1,doInit,SchemeBuilder.AddToScheme,scheme.init,apiutil.init,AddKnownTypes,do_mem_abort,do_page_faultall absent below 0.254%.proxy-readyseries costs 0.75 core-s (kernel clone/fork frames only) — 52x cheaper than the binary it replaced.Caveat on completeness: Kubernetes events have a ~1h TTL on this cluster and
aether-systemhad none left at grade time, so the flap enumeration above is from supervisor logs of the current generation plus the checkpoint readings, not an 8h event census.Verdict: holds in production. Staying closed.
perf(mesh-dns): stdlib-only readiness prober, and --debug off by defa…
docs(observability): refresh profiling-symbols for content-hash build…
docs(observability): explain why profile symbols decay after a release (
chore: remove the shadow GAMMA export encoder and superseded SPIRE TL…
docs: document shipped features found undocumented by the 2026-09-15 …
perf(proxy): split the hot-restart supervisor out of the agent binary (…
perf(proxy): split the hot-restart supervisor out of the agent binary (…
chore: remove the expired deprecated shims — agent proxy-supervisor a…