Skip to content

Align TCP scheduling, diagnostics and metrics with TENT v0.3.14 - #151

Merged
feichai0017 merged 4 commits into
mainfrom
feat/r1d-tcp-observability-v0.3.14
Nov 4, 2026
Merged

feichai0017 merged 4 commits into
mainfrom
feat/r1d-tcp-observability-v0.3.14

Conversation

@feichai0017

@feichai0017 feichai0017 commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

R1d implements the six remaining Port rows in the v0.3.14 delta. Together with #149 (six RDMA rows) and #150 (seven storage and CUDA rows), all 19 have source implementations and regression controls.

Mooncake change OrbitTE behavior and evidence
#4935 Single-slice operations sample only outstanding single-slice work for this peer. Rotation breaks ties. A lane slot lives with the socket future and releases before the receipt, even on cancellation or future destruction. Preflight and admission precede the slot. Striped READs keep their static rail assignment.
#4410 Regular TCP stages the peer’s GPU range at the peer. CI runs a separately compiled CPU-only requester against an independently spawned CUDA-shim source process over real TCP, checks the chosen transport, and checks both payloads and guards. Local GPU ranges require CUDA.
#4938 Prometheus and JSON export build, runtime sampling, HTTP startup and per-format attempts, failures and last success. A failed serialization returns HTTP 500. A live server still answers health checks. Programmatic status also works when initialization was disabled and no server exists.
#5094 Logical starts commit with accepted public tasks. Physical submission records independent attempt pairs. CROSS children carry the staging attempts. Starts that were sampled settle even during a pause. The four outcomes are success, failure, timeout and cancellation, with the frozen label spellings. The parent retains its dispatch/transport latency and failure phase. JSON includes aggregate task failures. Registered-byte gauges and transfer permits have separate lifetimes.
#5125 RDMA installation reads only MC_DISABLE_GPU_DIRECT_RDMA and MC_LOG_RDMA_SLICE_AFFINITY. Both accept case-insensitive true/false, yes/no, on/off and 1/0. Invalid inputs preserve the typed value. Slice logs contain NIC names and length.
#4154 The packaged crate installs tent diagnostics version [--json]. The CLI, Rust diagnostics API and native header share the schema, renderer and build metadata. The CLI uses the standard argument iterator and the existing serde_json dependency. Free-text redaction uses regex-lite. Linked C and C++ clients exercise version, output failure, invalid input, redaction and snapshot exit status. The install gate compares the actual archive commit and CLI output in an isolated target directory and traces the CLI for socket or worker syscalls.

Upstream test correspondence

Frozen test OrbitTE control
HighPerformanceTcpTransportTest.LaneLoadReturnsToZeroOnRejectedSubmits rejected_hp_submissions_leave_no_lane_load checks byte admission, a later invalid range and a completed transfer. least_loaded_lane_bypasses_a_delayed_ack_and_releases_after_completion holds the rotating choice busy while a second lane completes a READ and the next WRITE.
HighPerformanceTcpLaneDistributionTest.InterleavedPeersUseEveryConfiguredLane periodic_fanout_rotates_lanes_independently_per_peer and static_ipv4_pairing_balances_uneven_reads_rotates_small_requests_and_never_stripes_writes
TcpTransportCapabilityTest.CpuPlatformCanSelectPeerGpu cpu_platform_can_select_peer_gpu covers all five local/remote/export cases. peer_gpu_tcp_stages_both_directions_for_a_host_requester exercises the CPU-only child, plus the shim source’s CUDA copy and guard checks.
LegacyBoolEnvAcceptsNumericValues, LegacyRdmaSliceAffinityLogEnvLoadsIntoTentConfig legacy_bool_env_accepts_numeric_values_at_rdma_install checks all spellings, invalid fallback, and two child environments with opposite switches through the real install entry point.
PrometheusMetricFamilyContract, JsonEndpointValid, HealthEndpointOk prometheus_metric_family_contract checks all 34 frozen families. exporter_health_survives_pause_and_failed_serialization, real_tcp_merged_owner_exposes_one_transfer_and_scrapes_both_formats, the existing histogram controls, and tests/metrics/scrape.py with the reference Prometheus parser
SelfMetricsRemainVisibleWhenRuntimeDisabled, FailedSerializationIsVisibleOnTheNextSuccessfulScrape exporter_health_survives_pause_and_failed_serialization checks HTTP 500, each format's attempt/failure/freshness, recovery, health and construction-time disable
TentMetricsHttpServer.DegradesToLogOnlyWhenConfiguredPortBusy, both DisabledAtCompileTime controls busy_port_degrades_to_log_only_and_drop_joins_bounded_http_workers verifies startup failure and rebind. The installed default CLI reports metrics compiled out. The feature matrix and S10 benchmark exercise the three build/runtime modes.
CompletedTransferRecordsBytesAndLatency, RecoveredFailoverRecordsDistinctAttempts real_tcp_merged_owner_exposes_one_transfer_and_scrapes_both_formats, metrics_attribute_each_retry_and_one_merged_outcome_to_the_real_transport and the guarded multi-chunk staging control requester_reuses_bounded_slots_at_negotiated_chunk_size_including_tails
AccountingPairsSurviveRuntimeEnableToggle, AccountingUsesBoundedTerminalOutcomes, InflightGaugeSurvivesEnableToggle pairs_follow_the_start_and_only_emit_bounded_outcomes, gauges_survive_toggles_failures_keep_the_first_stage_and_quarantine_counts_once, and the allocation-counted recording path
AllocateSubBatchFailureSettlesRequestAndDoesNotBlockBatch, CanceledUnroutableRequestRemainsCanceledAcrossPolls OrbitTE rejects an unroutable prepare before admission. rejected_preflight_records_no_start_and_a_failed_prefix_settles_its_suffix checks that boundary and accepted skipped work. queued_cancellation_timeout_and_oversize_have_no_io_and_partial_cancel_keeps_prefix checks reuse after rejection, repeated cancel observation, two public outcomes and no transport starts.
cli_test.py (all 11 argument cases) packaged_cli_contract_and_compiled_feature_flags checks stdout/stderr, usage and exit codes, plus the installed default binary and native callers on both toolchains.
DiagnosticSchemaTest (2), DiagnosticRendererTest (2), DiagnosticExitCodeTest (2), DiagnosticVersionTest (1) version_schema_renderers_and_exit_precedence covers the stable schema/outcome strings, unavailable evidence, text/JSON check facts, non-pass evidence, warning rules, collector/internal precedence and offline features.
DiagnosticRedactionTest (8) secret_fields_and_text_are_redacted_in_every_mode and strict_pseudonyms_match_fields_whole_words_and_address_shapes cover field and text secrets, per-snapshot identifiers, word boundaries, IPv4/IPv6/GID/MAC/GUID, lookalikes and non-strict deployment strings.

S10 benchmark comparison

Linux 6.12.76 arm64, 12 vCPUs, Rust 1.99.1, release, real loopback, guarded single-operation READ/WRITE. Each cell is the median of nine trials in µs, before → after, using the same runner and python3 tests/metrics/benchmark.py at base and on the R1d implementation. One operation at a time measures local overhead. The delayed-ACK test exercises lane imbalance independently.

Size and mode TCP READ TCP WRITE HP-TCP READ HP-TCP WRITE
64 B, compiled out 47.29 → 52.49 49.90 → 50.86 75.46 → 76.03 75.01 → 75.60
64 B, configured off 47.59 → 52.31 54.28 → 52.50 77.08 → 75.71 76.06 → 75.57
64 B, enabled 51.20 → 48.95 50.91 → 53.62 77.52 → 77.01 77.13 → 75.87
4 MiB, compiled out 2,277.06 → 2,216.44 2,999.76 → 3,019.08 586.79 → 610.91 576.49 → 584.34
4 MiB, configured off 2,249.51 → 2,207.26 2,986.82 → 2,996.26 582.05 → 592.53 588.38 → 582.68
4 MiB, enabled 2,180.67 → 2,265.89 2,983.31 → 2,999.97 601.51 → 602.97 567.40 → 583.52

Handoff

  • Commit 4f02d16fae65ad5921a8848d536e9a54556f494f, based on 4608f1ab36ca724e1f4d42aa052811b3bbf34450. Scope B01/B02, F01, F12, F14, F17 and F20. Status Implemented.
  • Frozen revision e1ea5d31bb5e46ff2df9f90e7c2fbaf52fcdee8c. Followed tent/src/transport/{hp_tcp/hp_tcp_transport,tcp/tcp_transport,rdma/rdma_transport,rdma/workers}.cpp, src/common/config.cpp, src/metrics/tent_metrics.cpp, include/tent/metrics/{cached_metric,tent_metrics}.h, src/runtime/transfer_engine_impl.cpp, cli/main.cpp, src/diagnostics/diagnostic.cpp and include/tent/diagnostics/diagnostic.h.
  • Per-engine budgets precede HP-TCP lane selection. Each alias is a public start even when TENT skips a derived task. Pre-admission rejects add zero starts. Accepted unexecuted suffixes get a bounded outcome. An explicit Direct configuration with GPU Direct disabled fails closed. The executor still owns uncertain READ/WRITE memory and drain receipts. Version diagnostics use the OrbitTE package’s own version, commit, compiler and build features. No engine or transport wire change. Development VERSION remains 1.
  • Linux arm64 with 12 test threads passed the 12 focused controls 50/50. The initial loop reproduced the busy-port race when another listener bound port zero during the handoff. The fixture now reserves a port outside Linux's ephemeral range and keeps a cross-process guard. The four HTTP controls passed 200/200 after the fix. These changes affect fixture ports only.
  • Final head passed all 28 Linux jobs (14 feature sets on stable and 1.85.0). Commands included cargo fmt --check, locked check, Clippy with --all-targets -- -D warnings, test, publish dry-run, CPU traces and the installed consumer controls. The R1d job repeated all 12 controls 50/50 with four x86 Linux test threads, including the separate CPU-only requester. CI matrix · R1d stability job
  • The frozen native TENT CPU trace and RDMA slice geometry comparisons passed. Strict Sphinx, local links and fragments passed across 27 pages. Native oracle · Documentation
  • On Linux arm64, the packaged binary passed the unchanged upstream tests/cli_test.py (11/11 per toolchain). strace saw no networking or worker creation on the version path. C and C++ consumers linked the packaged header and produced the same JSON as the binary. The gate uses a fresh target for each same-version extraction because Cargo's normalized archive timestamps can otherwise leave an older binary in a shared target directory.
  • The paired public CPU/GPU gate is written and built from the packaged crate. To run on a CUDA host, build python3 tests/hardware/build_installed.py --consumer peer-gpu-source --output "$ART/source" and python3 tests/hardware/build_installed.py --consumer peer-gpu-requester --output "$ART/requester", then run python3 "$ART/source/peer_gpu_tcp_run.py" --source "$ART/source/installed/bin/orbitte-peer-gpu-source" --requester "$ART/requester/installed/bin/orbitte-peer-gpu-requester" --gpu "$GPU_UUID". Physical GPU TCP and multi-rail performance remain unqualified. S17 owns general configuration loading.

@feichai0017
feichai0017 marked this pull request as ready for review November 4, 2026 06:26
Copilot AI balanced review requested due to automatic review settings November 4, 2026 06:26

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

@feichai0017
feichai0017 merged commit 4ea774a into main Nov 4, 2026
31 checks passed
@feichai0017
feichai0017 deleted the feat/r1d-tcp-observability-v0.3.14 branch November 4, 2026 06:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants