You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
soak: QUIC twins cost the proxy fleet +33% CPU and ~+20% RSS under identical load (rev242 vs rev239); attribute before dropping the allow-list #1006
The proving QUIC soak (2026-09-27, talos rev242 / chart 0.95.3-cb79180, svc-1/svc-2 allow-listed, otherwise the same k6 load, churn schedule and prober as the rev239 run) cost the proxy fleet +0.71 cores (+33 %) and ~+20 % RSS against rev239 (0.94.0, no QUIC) under identical load.
Only two of the four k6 targets rode QUIC (svc-1/svc-2 ≈ 2.88 M of the 5.76 M k6 requests), so the per-request cost of HTTP/3 vs h2 is worse than the fleet ratio suggests.
Two things are entangled and must be attributed before east-west QUIC goes unconditional:
The twins. A quic: twin cluster is built for every local ServiceAccount × allow-listed destination (5,960 @ series fleet-wide in this run), not just the identities that actually dial the destination. Unconditional QUIC multiplies the twin count by roughly the number of mesh services per node. That is a fixed per-cluster cost (health checks, stats, SDS, TLS contexts) paid regardless of traffic.
HTTP/3 per-request cost (userspace QUIC + TLS 1.3 per packet, no kernel offload) paid only on traffic that moves.
Neither is separable from the fleet number above.
Ask
A rev242-vs-rev239 flamegraph diff on aether-proxy (Pyroscope has both), splitting the delta between the quic: cluster fixed cost and the HTTP/3 request path.
If the twin fixed cost dominates: build twins only for identities that have actually dialled the destination (demand-scoped, the way Refactor agent #4 scopes CDS) before dropping the allow-list.
Record the QUIC baseline for the next soak: compare proxy CPU to 2.88 cores, not 2.16.
Attribution: the fixed cost of the twins is about zero. The HTTP/3 request path is nearly all of the +0.78 cores.
Headline. At matched load, the idle quic: twins cost ≈ 0 CPU: ≤ 0.02 cores, and all three measurements put it at 0.00–0.003. Their cost is memory, about 220 KiB of heap per twin, plus about 52 stat series each. Almost all of the CPU delta, and about 80 % of the heap delta, is traffic-driven: HTTP/3 costs about 3× an h2 mesh request at this workload (+≈7.8 ms of proxy CPU for each QUIC request, counting both ends). Demand-scoping the twins is still worth doing, for memory, stats, CDS size and #1008, but it will not recover the CPU. The CPU is in the request path.
Method and windows
Windows. Both are the T0-matched no-roll 80 min window, with the same churn offset (T0 + 6h05m → T0 + 7h25m) and no proxy, agent or service roll inside it:
rev239: 2026-09-26 19:20:42–20:40:42Z
rev242: 2026-09-27 16:00–17:20Z
Load was identical.increase(envoy_cluster_upstream_rq_total)/4800 per mesh destination: echo 100.1 / 99.9, mixed-svc 50.8 / 50.8, svc-1..4 49.9–50.1 each in both runs. In rev242, svc-1 and svc-2 ran entirely on …@aether-test/default (50.0 / 50.1 rps), so QUIC carried 100 of the 350 mesh rps (28.6 %). Fleet upstream rq total was 853 vs 863 rps (+1.2 %).
CPU source. Pyroscope process_cpu, service_name="aether-proxy", split by process_executable_name. Points are end-labelled, and the first point of each window is dropped. Profiles are pprof graphs (format=dot, top 260 of 10.7k / 14.0k nodes, 93.5 % / 93.6 % of samples shown).
1. Fleet cores and the split
rev239 (no QUIC)
rev242 (QUIC svc-1/2)
Δ
aether-proxy, all processes
2.168
2.912
+0.745 (+34 %)
envoy
2.092
2.872
+0.780 (+37 %)
supervisor
0.073
0.037
−0.036 (not QUIC; noted only because it offsets the total)
opa + runc + proxy-ready
0.004
0.004
0
The 7 h figures in the issue (2.165 / 2.879) reproduce within 1 % in this narrower, cleaner window.
envoy Δ +0.780 cores attributed to
cores
share
evidence
(A) fixed cost of the twins (118 fleet-wide)
≈ 0.00–0.003, bounded ≤ 0.02
≤ 3 %
(a) idle test: envoy was 0.923 cores idle on rev239 with 472 clusters (09-26 21:40–22:15Z) and 0.911 idle on rev240 with 580 clusters (+108 idle twins, 09-27 00:00–06:00Z, 0 rps on any @ cluster). Background traffic was the same (149 vs 147 upstream rps), so the result is −0.012 ± noise. (b) main thread (Server::InstanceBase::run, where CDS, stats flush, outlier timers and HC scheduling run): 0.0395 → 0.0426, +0.003. (c) active HC (HealthCheckerImplBase::ActiveHealthCheckSession timer): 0.0084 → 0.0088, +0.0004.
(B) HTTP/3 request path
≈ 0.76–0.78
≈ 97 %
by elimination: A ≈ 0, load matched to ±1.2 %, and the idle test also bounds the build change (below). Directly QUIC-tagged frames are broken out below.
unattributed: Envoy build change (0.94.0 → 0.95.3 carries the Envoy pin bump; the absl namespace moves lts_20260107 → lts_20260817)
not separable at load; ≈ 0 at idle
—
No run exists on the new Envoy under load without QUIC. At idle, with the same ~150 rps background traffic, the build moved envoy by −1.3 %.
What (B) is made of (cumulative cores; frames with no rev239 counterpart marked "new"; the rows overlap, so they do not sum):
Tagged lower bound. The four disjoint user-space QUIC entry points (client socket events + listener reads + ACK alarm + inline H1-side writes) add up to 0.201 cores. The rest of B shows up in generic kernel and scheduler frames: RX softirq, bridge/netfilter/vxlan, epoll/scheduler wakeups, get_random_u16. Stack-depth truncation also hides part of it (see "Not measured").
Why a request costs this much. Each request is tiny (92 B in, 903 B out on svc-3/4). 128 QUIC connections carry 100 rps, about 0.8 rps per connection. The h2 side has the same 128 connections for svc-3/4 and 0 new connections in the window on either side, so this is not handshake churn. Every request is therefore its own flight: userspace ACK processing, ACK and packet-flush alarms, and an extra UDP datagram each way. There is no kernel delayed-ACK, TSO or GRO help. The profile agrees: UDP TX, RX softirq and scheduler/epoll wakeups grew, while TLS-over-TCP writes fell by about the 29 % share that moved off TCP.
Per-request CPU. Loaded minus idle on rev239 is 1.169 cores over 350 mesh rps, so ≈ 3.3 ms of proxy CPU per h2 mesh request (both proxies, all three legs). QUIC adds ≈ 0.78 cores over 100 rps, so +≈ 7.8 ms. An h3 request therefore costs ≈ 11 ms, about 3.3× an h2 request. These are loaded-minus-idle estimates, not a per-request profile.
2. Top 10 self-time growers (flat core-s per 80 min, rev239 → rev242)
The growth is diffuse. These ten account for ≈ 0.06 of the 0.78 cores; the rest is spread across more than 13k functions. The scheduler and wakeup frames are at the top, which fits the "many small flights" mechanism. No cluster-manager, ClusterImplBase, Stats:: or SDS frame grew enough to appear. User-space leaf functions (AES-GCM, QPACK, memcpy) are not individually visible at this node budget; see "Not measured".
3. Metric cross-checks
Twin count.envoy_cluster_manager_active_clusters (proxy fleet, excluding edge) went from 502 to 620 (+118). Distinct @ clusters per node: w01 28, w02 22, w03 18, w04 28, w05 22 = 118 = 2 × local SAs (14/11/9/14/11). There are 6,162 @ series, about 52 per twin. Only 2 of the 118 twins (…@aether-test/default) had any connection or request.
Health checks.envoy_cluster_health_check_* is not in Prometheus (no series in either run), so the HC rate cannot be split @ vs non-@ from metrics. From the code instead: QUICClusterFrom (agent/internal/xds/proxy/egress.go:184) clones the EDS service cluster from NewServiceCluster, which has no active health_checks. Only the per-pod health_<pod> and inboundready_<pod> clusters have them (proxy/cluster.go:429, :526). So twins have no health checks to remove. The profile's HC session frame is flat (+0.0004 cores), which confirms it.
Heap (envoy_server_memory_allocated, fleet sum; no cadvisor/RSS series here):
idle
loaded
no twins (rev239)
149.7 MiB (472 clusters)
243.3 MiB
twins (rev240 idle / rev242 loaded)
173.3 MiB (580 clusters)
353.7 MiB (+110.4, +45 %)
(A) memory: +23.6 MiB for 108 idle twins = ≈ 223 KiB per twin, and consistent per node (162–290 KiB). That is about 26 MiB at 118 twins. It fits each twin carrying its own QUIC client TLS context plus per-worker cluster state.
(B) memory: traffic-driven growth was +93.6 MiB without QUIC and +180.5 MiB with it, so +87 MiB comes from 128 client + 128 server QUIC connections, ≈ 340 KiB per QUIC connection end.
Split of the +110 MiB heap delta: ≈ 23 % A, ≈ 77 % B. The ~+20 % RSS in the issue is this, diluted by non-heap RSS.
Stats-flush cost is not separable. It runs on the main thread, and the whole main thread moved +0.003 cores.
Request rates.rate(envoy_cluster_upstream_rq_total{aether_cluster=~".*@.*"}) averaged 100.1 rps in the window (twins only). It was 0 overnight, while the twins existed but carried nothing, which is what makes the idle test clean.
4. Projection for unconditional QUIC (dropping the allow-list, #979)
N (local SAs per node) = 14/11/9/14/11, 59 fleet-wide.
M (QUIC-eligible HTTP mesh destinations) ≈ 11: svc-1..5, echo, mixed-svc, authz-echo, authz-canary, uds-echo, uds-cr-echo. tcp-echo and udp-echo are excluded.
≈ +2.7 cores for all 350 mesh rps: fleet ≈ 4.8 cores vs 2.09 all-h2 (≈ 2.3×)
(B) heap
+87 MiB (128 conn pairs)
≈ +300 MiB (458 mesh HTTP connections today)
The (B) rows assume per-request cost stays at 7.8 ms. That is linear scaling at the current connection count and request mix; busier connections would lower it.
Twin health checks: nothing to cut. Twins inherit the service cluster's config, which has no active HC; readiness comes from EDS through the health_/inboundready_ clusters. A shared-HC design is unnecessary.
(a) Find out why each destination gets 64 connections fleet-wide (about 13 per node) for 50 rps. Fewer, busier QUIC connections per (source identity, destination) would amortise the ACK and flush alarms and the wakeups.
(b) Try UDP GSO on the upstream and listener writers and GRO on reads (none is configured in agent/internal/xds), and review the QUIC ACK-delay/ack-frequency settings.
(c) Set an explicit gate: per-QUIC-request proxy CPU ≤ ~1.5× h2, measured with this matched-window method, before the allow-list is dropped.
(d) Keep 2.88 cores as the QUIC baseline for the next soak, as the issue already says.
Not measured, and why
Health-check rates:envoy_cluster_health_check_* is absent from Prometheus. This is answered from code plus the profile instead.
Build vs QUIC at load: there is no loaded run of the new Envoy build without QUIC. It is bounded only at idle (−1.3 %).
User-space attribution is a lower bound. The eBPF stacks are depth-truncated: only 28.7 % of envoy samples keep thread_start at the root, and Pyroscope's flamebearer JSON collapses about 60–70 % into a root-level other. Cumulative values for mid-stack frames (the tables above) are therefore lower bounds. Leaf user-space self-time (QUIC crypto, QPACK, memcpy) is not individually visible in the 260-node graph. That is why only ≥ 0.20 cores of B carries an explicit QUIC frame and the rest sits in generic kernel and scheduler frames.
Stats-flush cost, per cluster: below resolution. The whole main thread moved +0.003 cores.
QUIC bytes per request:upstream_cx_rx/tx_bytes are not emitted on @ clusters. The per-request payload is taken from svc-3/4 (92 B / 903 B).
RSS proper: there is no cadvisor RSS series, so envoy_server_memory_allocated (heap) is used instead.
Attributed (comment above): idle twins ≈ 0 CPU (fixed cost is memory + stat series), the HTTP/3 request path is ~97 % of the delta at ~3.3× the per-request cost of h2, driven by ~0.8 rps per QUIC connection. Split into two actionable issues: #1020 (demand-scope the twins) and #1021 (per-request cost: connection fan-out, GSO/GRO, ACK settings; ≤1.5× gate for #979). Closing this as the attribution it asked for.
Activity
bpalermo commentedon Sep 27, 2026
Attribution: the fixed cost of the twins is about zero. The HTTP/3 request path is nearly all of the +0.78 cores.
Headline. At matched load, the idle
quic:twins cost ≈ 0 CPU: ≤ 0.02 cores, and all three measurements put it at 0.00–0.003. Their cost is memory, about 220 KiB of heap per twin, plus about 52 stat series each. Almost all of the CPU delta, and about 80 % of the heap delta, is traffic-driven: HTTP/3 costs about 3× an h2 mesh request at this workload (+≈7.8 ms of proxy CPU for each QUIC request, counting both ends). Demand-scoping the twins is still worth doing, for memory, stats, CDS size and #1008, but it will not recover the CPU. The CPU is in the request path.Method and windows
increase(envoy_cluster_upstream_rq_total)/4800per mesh destination: echo 100.1 / 99.9, mixed-svc 50.8 / 50.8, svc-1..4 49.9–50.1 each in both runs. In rev242, svc-1 and svc-2 ran entirely on…@aether-test/default(50.0 / 50.1 rps), so QUIC carried 100 of the 350 mesh rps (28.6 %). Fleet upstream rq total was 853 vs 863 rps (+1.2 %).process_cpu,service_name="aether-proxy", split byprocess_executable_name. Points are end-labelled, and the first point of each window is dropped. Profiles are pprof graphs (format=dot, top 260 of 10.7k / 14.0k nodes, 93.5 % / 93.6 % of samples shown).1. Fleet cores and the split
The 7 h figures in the issue (2.165 / 2.879) reproduce within 1 % in this narrower, cleaner window.
@cluster). Background traffic was the same (149 vs 147 upstream rps), so the result is −0.012 ± noise. (b) main thread (Server::InstanceBase::run, where CDS, stats flush, outlier timers and HC scheduling run): 0.0395 → 0.0426, +0.003. (c) active HC (HealthCheckerImplBase::ActiveHealthCheckSessiontimer): 0.0084 → 0.0088, +0.0004.lts_20260107→lts_20260817)What (B) is made of (cumulative cores; frames with no rev239 counterpart marked "new"; the rows overlap, so they do not sum):
EnvoyQuicClientConnection::setUpConnectionSocketread-event lambda (source side, reads + processPacket)UdpListenerImpl::handleReadCallback(destination-side QUIC listener)quic::QuicConnection::OnAckAlarmHttp1::ConnectionImpl::dispatch: QUIC writes inline from the H1 side (h2 defers them toonWriteReady)quic::QuicConnection::ScopedPacketFlusher::~(two sites)udp_sendmsg(QUIC TX; below the 0.0015 cutoff in rev239)__netif_receive_skbnf_hook_slow/vxlan_xmit/do_epoll_wait/scheduletcp_sendmsg/ConnectionImpl::onWriteReady/Http2::ConnectionImpl::dispatch/ bssldo_tls_writeget_random_u16. Stack-depth truncation also hides part of it (see "Not measured").Per-request CPU. Loaded minus idle on rev239 is 1.169 cores over 350 mesh rps, so ≈ 3.3 ms of proxy CPU per h2 mesh request (both proxies, all three legs). QUIC adds ≈ 0.78 cores over 100 rps, so +≈ 7.8 ms. An h3 request therefore costs ≈ 11 ms, about 3.3× an h2 request. These are loaded-minus-idle estimates, not a per-request profile.
2. Top 10 self-time growers (flat core-s per 80 min, rev239 → rev242)
sched_balance_update_blocked_averagesfinish_task_switchlocal_daif_restore(IRQ re-enable on arm64)__ip_append_data(UDP TX, new)get_random_u16__dev_queue_xmitudp_sendmsg(new)__netif_receive_skb_coreudp_recvmsg(new)vxlan_xmit_one/nf_hook_slow/ep_try_send_eventsThe growth is diffuse. These ten account for ≈ 0.06 of the 0.78 cores; the rest is spread across more than 13k functions. The scheduler and wakeup frames are at the top, which fits the "many small flights" mechanism. No cluster-manager,
ClusterImplBase,Stats::or SDS frame grew enough to appear. User-space leaf functions (AES-GCM, QPACK, memcpy) are not individually visible at this node budget; see "Not measured".3. Metric cross-checks
Twin count.
envoy_cluster_manager_active_clusters(proxy fleet, excluding edge) went from 502 to 620 (+118). Distinct@clusters per node: w01 28, w02 22, w03 18, w04 28, w05 22 = 118 = 2 × local SAs (14/11/9/14/11). There are 6,162@series, about 52 per twin. Only 2 of the 118 twins (…@aether-test/default) had any connection or request.Health checks.
envoy_cluster_health_check_*is not in Prometheus (no series in either run), so the HC rate cannot be split@vs non-@from metrics. From the code instead:QUICClusterFrom(agent/internal/xds/proxy/egress.go:184) clones the EDS service cluster fromNewServiceCluster, which has no activehealth_checks. Only the per-podhealth_<pod>andinboundready_<pod>clusters have them (proxy/cluster.go:429,:526). So twins have no health checks to remove. The profile's HC session frame is flat (+0.0004 cores), which confirms it.Heap (
envoy_server_memory_allocated, fleet sum; no cadvisor/RSS series here):Stats-flush cost is not separable. It runs on the main thread, and the whole main thread moved +0.003 cores.
Request rates.
rate(envoy_cluster_upstream_rq_total{aether_cluster=~".*@.*"})averaged 100.1 rps in the window (twins only). It was 0 overnight, while the twins existed but carried nothing, which is what makes the idle test clean.4. Projection for unconditional QUIC (dropping the allow-list, #979)
@stat seriesThe (B) rows assume per-request cost stays at 7.8 ms. That is linear scaling at the current connection count and request mix; busier connections would lower it.
5. Recommendation
aether-test/defaultdials svc-1/2 on each node), and it keeps the unconditional heap cost near 26 MiB instead of about 140 MiB.health_/inboundready_clusters. A shared-HC design is unnecessary.agent/internal/xds), and review the QUIC ACK-delay/ack-frequency settings.Not measured, and why
envoy_cluster_health_check_*is absent from Prometheus. This is answered from code plus the profile instead.thread_startat the root, and Pyroscope's flamebearer JSON collapses about 60–70 % into a root-levelother. Cumulative values for mid-stack frames (the tables above) are therefore lower bounds. Leaf user-space self-time (QUIC crypto, QPACK, memcpy) is not individually visible in the 260-node graph. That is why only ≥ 0.20 cores of B carries an explicit QUIC frame and the rest sits in generic kernel and scheduler frames.upstream_cx_rx/tx_bytesare not emitted on@clusters. The per-request payload is taken from svc-3/4 (92 B / 903 B).envoy_server_memory_allocated(heap) is used instead.bpalermo commentedon Sep 27, 2026
Attributed (comment above): idle twins ≈ 0 CPU (fixed cost is memory + stat series), the HTTP/3 request path is ~97 % of the delta at ~3.3× the per-request cost of h2, driven by ~0.8 rps per QUIC connection. Split into two actionable issues: #1020 (demand-scope the twins) and #1021 (per-request cost: connection fan-out, GSO/GRO, ACK settings; ≤1.5× gate for #979). Closing this as the attribution it asked for.
feat(quic): build a twin only for a (source SA, destination) pair tha…