yitae.dev
← Back to Experiments
LLM Serving & KV-Cache · 2026-07-15 · 2-Node ConnectX-5 RoCEv2 + NVIDIA B200 + MARA Cloud · 7 min read · yw-agn.7
Mixed

Systems Edge Audits: Fixing UCX Multi-Rail RMA (13.1 → 24.4 GB/s), CUDA Tree Verifiers, and 3-Window Contract Gates

Low-level systems instrumentation and reliability audits: fixing NIXL/UCX multi-rail RMA throttling (13.1 → 24.4 GB/s), verifying CUDA tree speculative kernels without claiming unrun speedups, and running 3-day API selection gates.

Headline result: UCX_MAX_RMA_RAILS=4: 13.10 → 24.39 GB/s (1.86×) · CUDA SD max err 0.00495 (1.36% trace OH) · DeepSeek 0.50 multi-day fail

On this page (9 sections)
Pre-registered Hypothesis, Falsification Criteria & Environment Manifest
Hypothesis
Default transport flags and unverified speculative/API harnesses hide silent throughput cliffs, kernel sampling biases, and multi-day model reliability variance that controlled audits cleanly expose.
Falsification Criteria
If UCX RMA matches multi-rail tag bandwidth without configuration changes, speculative tree kernels diverge from scalar probability distributions or observer tracing slows inference by >= 5%, or single-day API checks predict multi-day function reliability, explicit low-level audits are redundant.
Host / Compute
2× AMD Turin (128 cores, 2× dual-port ConnectX-5 100GbE) · Shared B200 (SGLang 0.5.21, Qwen3-14B) · MARA Cloud
Runtime
UCX 1.20.x + NIXL 0.10.0 · torch 2.13.0+cu130 · Strict JSON/Function validator
Workload / Dataset
DRAM-to-DRAM RDMA (1 KB–4 MB, 100 iters) · 24 Markov cells + 360 SD trace reqs · 3-window MARA function suite (1,200 reqs)
Sample Size / Repeats
100 RDMA iters/size · 786,432 CUDA SD draws · 5 randomized B200 engine pairs · 3×100 req/model

1. Motivation: The Gap Between Theoretical Bandwidth, Speculative Speedup, and Real Systems

High-level benchmarks break down in production for mundane systems reasons: an uncalibrated transport flag caps a 400 Gbps fabric to a single NIC lane (13.1 GB/s), an unverified speculative decoder subtly shifts sampling probabilities, or an API model passes a 10-minute smoke test before degrading across multi-day traffic windows. Here we bundle three concrete engineering audits across our transport (obsidian/260414), kernel (mlsys/graphkv-cosched), and contract (mara) labs—strictly separating measured facts from unrun analytical baselines.

2. Hypothesis, Falsification & Experimental Mechanism

We hypothesized (Mixed across the three low-level stacks) that transport defaults, speculative kernel verifiers, and multi-day API drift harbor silent cliffs undetectable in short smoke runs; falsified if default multi-rail flags saturated 400 Gbps, SD observer tracing exceeded 5% overhead, or single-day API checks held steady across 3 days.

NIXL + UCX Multi-Rail Bottleneck vs Coalesced DMA Path
Default Config (UCX_MAX_RMA_RAILS=1)UCX_MAX_RNDV_RAILS=4 ignored by ucp_put4 MB DMA: 13.10 GB/s (~1 NIC active)1,024×1KB: ~53.8ms reg + ~117ms prepSingle-GPU cross-NUMA filter halves to 2 NICsFixed Config (RAILS=4 + Coalesced >=1 MB)Explicit UCX_MAX_RMA_RAILS=4 across 4×100GbE4 MB total: 171.9 µs · 24.39 GB/s (1.86×)Protocol overhead drops 59% (1KB) → 5% (4MB)TP=2 accesses all 4 NICs (~200 Gbps sustained)
In UCX 1.20.x, UCX_MAX_RNDV_RAILS=4 accelerates tag matching (perftest 27.1 GB/s), yet NIXL RMA paths default to UCX_MAX_RMA_RAILS=1 (13.10 GB/s) unless explicitly overridden. Meanwhile, register-per-page overhead dominates scatter transfers under 64 KB.

3. Verification Testbeds

  • RDMA Fabric (260414-cxl-vs-rdma-analysis.md): 2× AMD Turin (128 cores), 2× dual-port ConnectX-5 (4×100 GbE RoCEv2), Mellanox Spectrum switch (jumbo MTU 9216), UCX 1.20.x, NIXL 0.10.0 (nixl_perf_bench.py, 100 DRAM-to-DRAM iterations). Disclosure: All CXL Memory Expander values (~200–400 ns) in the lab note are analytical extrapolations, not measured hardware trials (yw-pow.7).
  • CUDA Speculative Verifier & Async Observer (mlsys/graphkv-cosched): Shared B200 GPU 0 running SGLang 0.5.21 / torch 2.13.0: 24 synthetic Markov cells × 32,768 draws (786,432 joint draws) calling tree_speculative_sampling_target_only, plus 5 randomized fresh-engine Qwen3-14B NGRAM pairs (360 measured reqs) comparing observer off vs light.
  • 3-Window Strict Function Contract (mara/results/application-validation/): 3 independent daily windows (2026-07-13..15, N=100 req/day = 300/model, 1,200 total) requiring valid tool calls without truncation; Traffic-overlapped window-a-function was explicitly excluded via window-exclusion.json.

4. Visual Evidence & Quantitative Results

2-Node ConnectX-5 RoCEv2 bandwidth vs protocol overhead alongside MARA 3-window strict function contract latency.
Figure 1. Left: NIXL+UCX multi-rail RMA bandwidth climbs from 0.08 GB/s (1 KB, 59% protocol floor) to 24.39 GB/s (4 MB, 5% overhead) once UCX_MAX_RMA_RAILS=4 is set (1.86× over default 13.10 GB/s). Right: MARA 3-window gate fails DeepSeek-V3.1 (0.50 valid) while revealing large cross-day p95 shifts (1.1s → 12.4s) even among 100%-valid models.

NIXL + UCX RoCEv2 Scaling (MAX_RMA_RAILS=4, DRAM-to-DRAM)

Transfer SizeLatency (µs)Protocol Floor Share (~7.5 µs)Measured BW (GB/s)Operational Implication
1 KB12.859% (1.3 µs prep + 6.2 µs post)0.08Latency-bound; CXL/PCIe coalescing needed
16 KB11.957% raw log (~7.5 / 11.9 = 63% derived)1.41 (~1.38 from 11.9µs)Fixed per-op floor: 1→16 KB boosts BW ~18× flat latency
64 KB18.140%3.63Inflection zone begins
256 KB32.423%8.08Wire transfer overtakes SW stack
1 MB92.88%11.30Multi-block coalescing pays off
4 MB (1 vs 4 rails)171.9 (4-rail; ~164 wire DMA)5%13.10 → 24.39 (1.86×)Approaching 27.1 GB/s UCX tag_bw ceiling

Kernel Correctness, Observer Overhead, & Multi-Day API Gates

Audit SuiteConfiguration / ScopeMeasured MetricStatus / Interpretation
CUDA Tree SD Verifier (n=786,432)4 finite Markov chains × 3 seeds × 2 RNGMax joint-bin err = 0.00495; 12,288/12,288 scalar matchExact match; biased neg control (0.55 vs 1.0) caught
SD Async Observer off vs light (n=360)5 paired B200 Qwen3-14B NGRAM enginesSlowdown: +1.36% ([0.56%, 2.15%]); 210/210 IDs identicalSafe under con=1, gpu_time=null, warm tiny prompts
SGLang graph-agent SD Observer (n=96)3 pairs (289–295 → 283–289 tok/s)Slowdown: +1.73% ([1.46%, 2.25%], 0 drops)Clean instrumentation tax; not real E2E SD speedup
MARA Function Gate (3 days, n=1,200)DeepSeek-V3.1 vs M2.5 / M2.7 / gpt-ossMin valid: 0.50 vs 1.00 / 1.00 / 1.00 (0/0 trunc)MiniMax-M2.7 lowest worst p95 (5.69s vs 12.44s/11.58s)

5. Mechanism Breakdown: Subtle Bugs Caught Only by Micro-Audits

  1. Why UCX Multi-Rail silently drops half your NICs: On Linux RoCEv2, engineers routinely verify NIC bonding with ib_write_bw or ucx_perftest (tag_bw = 217 Gbps = 27.1 GB/s) after setting UCX_MAX_RNDV_RAILS=4. However, NIXL transfers invoke UCX’s RMA (ucp_put_nbx) transport, which reads UCX_MAX_RMA_RAILS (default 1)—silently throttling 4-rail hardware to 13.10 GB/s. Additionally, proto_multi_filter drops cross-NUMA NICs on single-GPU ranks (~111 Gbps vs ~200 Gbps on TP=2), and registering 1,024 × 1 KB descriptors separately triggers ~53.8 ms ibv_reg_mr() + ~116.9 ms descriptor allocation (~171 ms for 1 MB!).
  2. Separating SD observer overhead from speculative speedup: Running SGLang NGRAM over repeated identical synthetic KG schemas warmed the draft corpus abnormally cleanly (309–340 correct_drafts), and prior smoke attempts ...-01..04 crashed on startup/NUMA/VRAM. Therefore graphkv-sd-trace validates only that async tracing adds ~1.36% observer tax and kernel sampling matches scalar probability—it does not claim production speculative decoding gains on open workloads.

6. Key Findings & Transferable Insights

Distilled via multi-agent deliberation (Codex + Claude):

  • Coalesce KV transfers toward ≥16–256 KB and configure the transport API actually invoked: 1 KB and 16 KB take virtually identical wall time (12.8 µs vs 11.9 µs) because software submission (~7.5 µs) dominates—making small batch coalescing an essentially free bandwidth jump (0.08 → 1.41 GB/s), while NIXL RMA paths ignore UCX_MAX_RNDV_RAILS=4 until UCX_MAX_RMA_RAILS=4 unlocks 13.10 → 24.39 GB/s.
  • Negative controls validate kernel verifiers (0.55 vs 1.0), and multi-window gates expose variance hidden in 1-day smokes: 12,288/12,288 scalar parity in CUDA tree_speculative_sampling_target_only holds credibility because the biased 0.55 control actually failed the check; similarly, MARA APIs passed 100% in single windows while swinging 1.1s → 12.4s p95 across 3 days (DeepSeek-V3.1 dropped to 0.50 valid).

7. Scope Limits & Follow-Up Validation (yw-pow.7)

  • CXL hardware proof still pending (yw-pow.7): Because no physical Type-3 CXL expander ran in 260414, all CXL crossover projections (<64 KB high-frequency transfers) remain analytical calculations rather than measured timings.
  • Unmatched high-concurrency SD & OKX throughput (wt-h1-sdk / btc): Observer tax at concurrency >= 16 and unrun PostgreSQL mixed-load harnesses (~/lab/btc) remain in yw-pow.7 until hardware windows open.