|
| 1 | +# Phase 53 - Operator-Sized Performance And Resilience |
| 2 | + |
| 3 | +Phase 53 replaces smoke timing with an executable full-stack benchmark over |
| 4 | +native Linux SCTP and an independent C peer. |
| 5 | + |
| 6 | +## Completed Units |
| 7 | + |
| 8 | +| Unit | Capability | Status | |
| 9 | +| --- | --- | --- | |
| 10 | +| 1 | Full-stack performance lab executable | Complete | |
| 11 | +| 2 | Configurable warmup and sustained stages | Complete | |
| 12 | +| 3 | Configurable peak and soak stages | Complete | |
| 13 | +| 4 | P50, P95, P99, and maximum latency | Complete | |
| 14 | +| 5 | CPU, working set, allocation, and Gen2 metrics | Complete | |
| 15 | +| 6 | Association failover and reconnect orchestration | Complete | |
| 16 | +| 7 | Recovery traffic and loss validation | Complete | |
| 17 | +| 8 | PCAP, trace, peer logs, metrics, and comparison artifacts | Complete | |
| 18 | +| 9 | Hot-path allocation and TCAP queue corrections | Complete | |
| 19 | +| 10 | Retained baseline, docs, build, test, and pack | Complete | |
| 20 | + |
| 21 | +## Run The Benchmark |
| 22 | + |
| 23 | +The runner requires Linux kernel SCTP, lksctp headers, GCC, .NET 10, |
| 24 | +`tcpdump`, `tshark`, and `gzip`. |
| 25 | + |
| 26 | +```bash |
| 27 | +SIGTRAN_ARTIFACT_ROOT="$HOME/sigtran-lab/artifacts" \ |
| 28 | +SIGTRAN_WARMUP_OPERATIONS=1000 \ |
| 29 | +SIGTRAN_SUSTAINED_OPERATIONS=20000 \ |
| 30 | +SIGTRAN_PEAK_OPERATIONS=20000 \ |
| 31 | +SIGTRAN_RECOVERY_OPERATIONS=1000 \ |
| 32 | +SIGTRAN_SOAK_OPERATIONS=20000 \ |
| 33 | +bash scripts/run-full-stack-performance-lab.sh |
| 34 | +``` |
| 35 | + |
| 36 | +Counts, concurrency, addresses, point codes, and peer identity are environment |
| 37 | +configurable. Publication targets remain fixed in the lab report unless the |
| 38 | +executable is explicitly given alternative qualification arguments. |
| 39 | + |
| 40 | +## Runtime Corrections |
| 41 | + |
| 42 | +The first measured run exposed two production bottlenecks: |
| 43 | + |
| 44 | +- Native SCTP receive allocated a buffer as large as the maximum M3UA PDU for |
| 45 | + every message, and send copied an already array-backed payload. |
| 46 | +- The optional TCAP dialogue observation queue could block correlated result |
| 47 | + processing when no observation consumer was present. |
| 48 | + |
| 49 | +The native path now uses array-backed memory directly and falls back to |
| 50 | +`ArrayPool<byte>` only when required. `SCTP_NODELAY` is enabled by default |
| 51 | +through `NativeSctpTransportOptions.EnableNoDelay`. |
| 52 | + |
| 53 | +TCAP correlated processing no longer waits for the optional dialogue event |
| 54 | +consumer. A full observation queue drops the event and increments |
| 55 | +`TcapDialogueManagerMetrics.DroppedDialogueEvents`; inbound application Invoke |
| 56 | +components retain bounded backpressure. |
| 57 | + |
| 58 | +## Retained Baseline |
| 59 | + |
| 60 | +Run `performance-20260724T093659Z` completed on WSL2 kernel |
| 61 | +`6.18.33.2-microsoft-standard-WSL2` with .NET `10.0.9`, eight visible |
| 62 | +processors, native SCTP, packet capture, and the independent C peer. |
| 63 | + |
| 64 | +| Stage | Operations | Failed | TPS | P95 | P99 | Allocation | |
| 65 | +| --- | ---: | ---: | ---: | ---: | ---: | ---: | |
| 66 | +| Warmup | 1,000 | 0 | 4,913.2 | 2.352 ms | 92.041 ms | 10,179 B/op | |
| 67 | +| Sustained | 20,000 | 0 | 13,515.3 | 7.230 ms | 8.419 ms | 9,627 B/op | |
| 68 | +| Peak | 20,000 | 0 | 13,491.5 | 14.471 ms | 16.380 ms | 9,585 B/op | |
| 69 | +| Recovery | 1,000 | 0 | 4,333.8 | 13.255 ms | 89.833 ms | 9,626 B/op | |
| 70 | +| Soak | 20,000 | 0 | 13,582.4 | 6.911 ms | 8.058 ms | 9,501 B/op | |
| 71 | + |
| 72 | +All 62,000 requests and responses were counted at M3UA, SCCP, and TCAP. |
| 73 | +Association recovery completed in `1,039.1 ms`, recovery traffic completed in |
| 74 | +`1,270.4 ms`, and no recovery operations were lost. |
| 75 | + |
| 76 | +The retained bundle under |
| 77 | +`docs/evidence/PHASE53_PERFORMANCE_20260724T093659Z/` includes compressed PCAP |
| 78 | +and TShark output, peer logs, host profile, SDK trace, structured metrics, |
| 79 | +configuration, comparison, report, and SHA-256 manifest. |
| 80 | + |
| 81 | +## Qualification Decision |
| 82 | + |
| 83 | +The controlled execution passed, including sustained load, failover, recovery, |
| 84 | +and soak. It did not satisfy the `20,000 TPS` peak target: observed peak |
| 85 | +throughput was `13,491.5 TPS`. |
| 86 | + |
| 87 | +This result is also single-host WSL loopback. It cannot support an |
| 88 | +operator-sized multi-host capacity claim. That claim requires a dedicated |
| 89 | +Linux host or VM pair, representative CPU limits, production network latency, |
| 90 | +long-duration soak, and a separately operated peer. The runner is ready for |
| 91 | +that environment without code changes. |
0 commit comments