test(case2): real two-process socket + real-network cross-host confirmation - #124
Merged
Merged
Conversation
socket_echo_server.py: length-prefixed TCP echo = the remote-host network boundary. k3_specdecode_gpu_bench.py --socket-echo-addr round-trips the REAL per-block aux payload (verifier->proposer hidden states + draft tokens) through the socket once per block; --netem-sweep applies real tc netem latency on the loopback between runs. Replaces the injected-sleep RTT model with a true two-process socket + real-network measurement to corroborate the WAN-penalty curve. Co-authored-by: FluffyAIcode <FluffyAIcode@users.noreply.github.com>
Added socket_echo_server.py (remote-host boundary) + --socket-echo-addr socket round-trip of the REAL per-block aux payload (~156KB/block) in the fused engine. tc netem is blocked in the vast container (no NET_ADMIN), so real latency came from a real inter-host link (reverse SSH tunnel, ~102ms RTT): loopback (~0ms): 51.5 tok/s = 2.02x AR real net (~102ms): 14.1 tok/s = 0.56x AR (net loss; network = 71% wall time) End-to-end real-models + real-network proof that the cross-host token-level draft data plane is WAN-infeasible. Updated ADR 0014 + README. Co-authored-by: FluffyAIcode <FluffyAIcode@users.noreply.github.com>
… a floor); RTT decomposition + optimization levers Co-authored-by: FluffyAIcode <FluffyAIcode@users.noreply.github.com>
… tunnel) Co-authored-by: FluffyAIcode <FluffyAIcode@users.noreply.github.com>
…lock round-trip Co-authored-by: FluffyAIcode <FluffyAIcode@users.noreply.github.com>
gRPC echo probe (grpc_echo_probe.py) + --grpc-echo-addr fused-loop transport. Direct-gRPC over the real ~102ms path: 15.95 tok/s = 0.63x AR (vs raw-socket 0.56x) — modestly better (efficient 156KB serialization) but still a net loss; the ~102ms geographic RTT dominates, not the transport. Loopback gRPC 156KB = 1.1ms, so on a low-RTT link gRPC is free and the 1.8-2.2x win returns. (True non-SSH ingress blocked by vast forwarder; gRPC ran over the same SSH path.) Fixed net_bytes_per_block reporting for the grpc path. Co-authored-by: FluffyAIcode <FluffyAIcode@users.noreply.github.com>
…map, and one-line verdict (Case 1 + Case 2) Co-authored-by: FluffyAIcode <FluffyAIcode@users.noreply.github.com>
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.
What
Solidifies Case 2 (ADR 0014) with real two-process socket + real-network measurements and a direct-gRPC transport comparison, replacing the injected-sleep RTT model.
scripts/research/socket_echo_server.py— raw-TCP echo (remote-host boundary).scripts/research/grpc_echo_probe.py— raw-bytes gRPC echo + RTT probe.scripts/research/k3_specdecode_gpu_bench.py—--socket-echo-addr(raw) and--grpc-echo-addr(gRPC) per-block real round-trip of the actual ≈156 KB aux payload.Results (H200 NVL, real models, real network)
On the ~102 ms (clarification)
It is not a gRPC RTT and not a floor — it's a raw round-trip between two different-region hosts (+ SSH-relay overhead). Decomposed: 64 B → 102.6 ms (pure inter-region latency); 40 KB–156 KB flat at ~206 ms (an extra round-trip, not bandwidth).
Optimization levers (= the architecture's prescription): (1) latency — co-locate the draft loop (same region 5–20 ms, LAN 0.5–2 ms, Thunderbolt sub-ms; ≤15 ms → 1.8–2.2×); (2) transport — gRPC/QUIC (free at low RTT, modest help at high RTT); (3) payload — fp8/int8/top-k cuts the 156 KB 2–4×; (4) fewer round-trips — larger blocks.
Environment notes:
tc netemis blocked in the vast container (noNET_ADMIN); the non-SSH vast mapped ports accept SYNs but don't forward data, so real latency came from a real inter-host SSH path (the true direct-gRPC number would be ≤ the tunneled one). Documented in ADR 0014 §4.4.Files
scripts/research/{socket_echo_server,grpc_echo_probe}.py(new)scripts/research/k3_specdecode_gpu_bench.py(--socket-echo-addr,--grpc-echo-addr,--netem-sweep)docs/adr/0014-…md§4.3/§4.4 +README.mdresults/research/k3_crosshost_{realnet,socket_loopback,grpc}_gpu.jsonTesting
tc netem+ non-SSH direct ingress unavailable in the vast container — used a real inter-host path instead.