Skip to content

[TransferEngine] Add multi-node tebench launcher - #4649

Merged
alogfans merged 3 commits into
kvcache-ai:mainfrom
ToLiveAndLove:feat/3371-tebench-multinode
Oct 28, 2026
Merged

alogfans merged 3 commits into
kvcache-ai:mainfrom
ToLiveAndLove:feat/3371-tebench-multinode

Conversation

@ToLiveAndLove

@ToLiveAndLove ToLiveAndLove commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Description

Part of #3371.

Multi-node tebench runs currently require starting each process, copying segment names, and collecting results manually. Add an SSH launcher for fanout, incast, m2n, and all_to_all.

The launcher discovers targets, waits for initiators at a start barrier, collects logs and JSONL results, combines them into results.json, and stops its processes on exit. It supports separate address ranges per initiator and optional write_seed followed by read_verify. All-to-all runs a target and an initiator on each node, excluding self-transfers.

Executable paths must be absolute. Existing run directories are rejected, and cleanup only removes directories created by the current run. This uses the existing multi-target interface without changing the tebench binary.

results.json contains run metadata and one result entry per initiator and phase. Each entry keeps the complete original records, including per-target metrics. Original logs and JSONL are retained; Python 3 is required only on the launcher host.

Module

  • Transfer Engine (mooncake-transfer-engine)
  • Docs

Type of Change

  • New feature
  • Documentation update

How Has This Been Tested?

From the repository root, with Bash 4.3+, Python 3, and standard Linux tools including setsid:

benchmark=mooncake-transfer-engine/benchmark
bash -n "$benchmark/scripts/run_tebench_multinode.sh" \
  "$benchmark/tests/run_tebench_multinode_test.sh"
bash "$benchmark/tests/run_tebench_multinode_test.sh" \
  "$PWD/$benchmark/scripts/run_tebench_multinode.sh"

The test creates its own mock executable and temporary files; no build, SSH connection, RDMA hardware, or real tebench is required.

  • Success: topology expansion, per-initiator ranges, and seed/verify log and JSONL collection. The combined JSON preserves every source record, host, phase, initiator index, and exit code.
  • Failure: invalid arguments and missing/relative executable paths are rejected; an occupied run directory is preserved; seed exit code 7 stops verification; a timed-out initiator is terminated and its run directory removed. Failed and timed-out processes appear in the combined JSON with empty records when no output is available. Invalid JSON fails collection, preserves source files, and does not publish a partial summary.
  • Regression: before the directory check, an occupied run directory was accepted and deleted. The same test now rejects the run and preserves its contents.

Also passed in an empty environment and through CTest (tebench_multinode_script_test).

Two-host TENT RDMA runs used 1 GiB buffers, 64 KiB blocks, batch size 8, 5 seconds per phase, and separate ranges per initiator. M2N used two targets and two initiators with two threads each; all-to-all used four threads per initiator.

Topology Initiator write_seed GB/s read_verify GB/s
M2N (2×2) A 11.74 10.11
M2N (2×2) B 11.75 10.28
All-to-all (2 nodes) A 11.55 11.55
All-to-all (2 nodes) B 11.55 11.55

All eight initiator processes exited with 0, with no error logs or data mismatches. JSONL contained the expected targets and nonzero operation counts. Each topology produced a single results.json containing all four phase/process results, verified against the original JSONL. No processes or run directories from these tests remained.

Checklist

  • Code review completed
  • Documentation updated
  • Regression tests added
  • ShellCheck, codespell, cmake-format, and whitespace checks passed
  • Full pre-commit run completed
  • Documentation HTML build passed (one warning: the external PyTorch intersphinx inventory returned HTTP 403)

AI Assistance Disclosure

  • AI tools were used for drafting, review, and validation.

@alogfans

Copy link
Copy Markdown
Collaborator

I think it would be better to aggregate results in a single json file together.

@alogfans alogfans left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

@ToLiveAndLove

Copy link
Copy Markdown
Contributor Author

Thanks for the suggestion! Added results.json to combine all initiator results across hosts and phases, while preserving the original logs and JSONL files.

ToLiveAndLove and others added 3 commits October 20, 2026 19:57
Orchestrate fanout, incast, m2n and all_to_all runs over tebench's existing
multi-target interface, with start barriers, optional write_seed/read_verify
phases, per-initiator ranges and log/JSONL collection.
@ToLiveAndLove
ToLiveAndLove force-pushed the feat/3371-tebench-multinode branch from 57a16e3 to f7364b8 Compare October 20, 2026 12:05
@alogfans
alogfans merged commit 78f9eb6 into kvcache-ai:main Oct 28, 2026
31 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation run-ci Transfer Engine

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants