Skip to content

bench/shuffle: the flow, the hand-written shuffle and Ray across machines on Hetzner Cloud - #181

Merged
winding-lines merged 1 commit into
mainfrom
shuffle-hetzner
Nov 30, 2026
Merged

winding-lines merged 1 commit into
mainfrom
shuffle-hetzner

Conversation

@winding-lines

Copy link
Copy Markdown
Contributor

The measurement the keyed-partition work was missing: the shuffle benchmark across machines, where a reducer fetches pieces made on other hosts. Nothing under src/ changes.

Setup. Hetzner Cloud hel1, one private network. Three ccx23 worker machines (4 dedicated vCPUs, 16 GB) and a cpx32 head machine for the head and the driver. The project's 12-dedicated-core limit allowed three worker machines, not four. Configurations: A3 (3 workers on one machine), A4 (4 on one machine), B (one on each machine), C (four on each machine). Each ran flow, hand-written and Ray at PARTS 16 and 64, 3 passes, and the whole set ran twice.

Results (median ms, first / second repeat):

Config PARTS flow hand-written Ray flow / hand flow / Ray
A3 16 3985 / 3736 2921 / 2891 5620 / 5426 1.36 / 1.29 0.71 / 0.69
A3 64 3626 / 3653 2962 / 2932 6361 / 6498 1.22 / 1.25 0.57 / 0.56
A4 16 3222 / 3128 2529 / 2514 5656 / 5387 1.27 / 1.24 0.57 / 0.58
A4 64 3192 / 3176 2673 / 2628 6534 / 6349 1.19 / 1.21 0.49 / 0.50
B 16 3592 / 3534 2432 / 2414 3716 / 3811 1.48 / 1.46 0.97 / 0.93
B 64 3577 / 3564 2470 / 2496 4790 / 4490 1.45 / 1.43 0.75 / 0.79
C 16 1363 / 1355 1021 / 1012 2082 / 2076 1.33 / 1.34 0.65 / 0.65
C 64 1308 / 1315 996 / 978 2576 / 2477 1.31 / 1.34 0.51 / 0.53
  • All 52 runs gave exact answers: within 1e-9 of one process, and the flow's matched the hand-written shuffle's bit for bit everywhere. No processes or store files were left behind.
  • Across machines, the flow falls further behind the hand-written shuffle: 1.43 to 1.48 times its time with one worker per machine, against 1.19 to 1.36 on one machine. It stays faster than Ray, though only narrowly in B (0.93 to 0.97 at PARTS 16).
  • About two thirds of the pieces crossed machines. The reducers' fetches across machines cost the flow no more than they cost the hand-written shuffle. What grows is the flow's partition tasks' wait for their items: 8.9 to 9.5 s per pass in B, against 1.9 to 3.5 s on one machine. My best guess is placement falling back to another machine when the stream's own machine has no free slot. That cause is inferred, not verified.

bench/shuffle/cluster.py and cluster.sh make the run reproducible from the repository: the head on the head machine, workers over ssh on the private network, the driver, and one row per run. waits.py summarises the timelines, and summarize.py prints the cluster tables. No CHANGELOG line, following the earlier bench write-up PRs (#173, #174).

🤖 Generated with Claude Code

https://claude.ai/code/session_017TycsyUqdnuDeZrYc3z6wV

…ines on Hetzner Cloud

The shuffle benchmark on separate servers in one Hetzner location and private network: three ccx23 worker machines and a head machine, in four configurations (3 or 4 workers on one machine, one worker on each machine, four on each), PARTS 16 and 64, two repeats of 3 passes. Every answer is exact and the flow's is bit-identical to the hand-written shuffle's everywhere. Across machines the flow is 1.43 to 1.48 times the hand-written time with one worker per machine and 1.31 to 1.34 with four (1.19 to 1.36 on one machine), and 0.51 to 0.97 of Ray's. Reducers' cross-machine fetches cost the flow no more than the hand-written shuffle; its partition tasks' waits for their items do.

bench/shuffle/cluster.py and cluster.sh start the head, the workers over ssh and the driver and record one row per run; waits.py summarises the timelines' waits; summarize.py prints the cluster tables.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017TycsyUqdnuDeZrYc3z6wV
@winding-lines
winding-lines merged commit c248c1f into main Nov 30, 2026
12 checks passed
@winding-lines
winding-lines deleted the shuffle-hetzner branch November 30, 2026 00:28
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.

1 participant