Skip to content

bench/embed: the runs beside Ray Data (PR 3 of the plan) - #173

Merged
winding-lines merged 4 commits into
mainfrom
embed-runs
Nov 29, 2026
Merged

winding-lines merged 4 commits into
mainfrom
embed-runs

Conversation

@winding-lines

Copy link
Copy Markdown
Contributor

PR 3 of the embedding-gate plan (bench/embed/README.md): the measured runs of the dista flow beside Ray Data on sai and the Mac, the script that makes them, and the results folders.

  • bench/embed/run.py runs one system in one configuration. It samples the job's whole process tree once a second (PSS on Linux, RSS on macOS) along with each process's CPU, kills an embed process by pid when asked, checks the output, and appends a row to results/<date>-<host>/runs.tsv with the machine, commit, versions and exact command. bench/embed/runs.sh is the sequence of runs.
  • Pinning: EMBED_PIN in embed.mojo (sched_setaffinity between fork and exec, so the Mojo pool follows it) and --pin in embed_ray.py (each actor claims a CPU set and pins all its threads before PyTorch starts).
  • embed.mojo also prints the head's live objects (sampled once a second) and can serve the head's /metrics (EMBED_METRICS_PORT) for the retried-task count.
  • results/2026-11-28-sai and results/2026-11-28-bgent, and a "Results so far" section in the README. PR 3 is marked done there.

Results, in brief:

  • Speed passed on sai with the same CPU sets: 1.58 times Ray Data per pinned CPU at E=2, T=4 and 2.10 times at E=4, T=4. On the Mac the flow is 1.16 to 1.34 times ahead per CPU-second with the default setting.
  • Memory was not met as stated. The stub job stayed under a 512 MB budget up to 10M texts (15.4 GB of vectors), and its workers and live objects stayed flat, but the head (0.23 to 0.4 KB a batch) and the bench's driver list grow. Ray Data was over the budget at every size and grew as well.
  • Recovery passed: the output was exact both times. dista's time cost on sai was +61%, because the bench doesn't replace a killed worker.
  • Groups passed.

The full write-up is left for PR 4.

🤖 Generated with Claude Code

https://claude.ai/code/session_017TycsyUqdnuDeZrYc3z6wV

@winding-lines
winding-lines merged commit 0a3568e into main Nov 29, 2026
12 checks passed
@winding-lines
winding-lines deleted the embed-runs branch November 29, 2026 12:37
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