Skip to content

feat(presto/slurm): immutable result dirs, srun tracking, port preflight - #392

Draft
misiugodfrey wants to merge 1 commit into
mainfrom
misiug/bench-slurm-robustness
Draft

feat(presto/slurm): immutable result dirs, srun tracking, port preflight#392
misiugodfrey wants to merge 1 commit into
mainfrom
misiug/bench-slurm-robustness

Conversation

@misiugodfrey

Copy link
Copy Markdown
Contributor

Summary

Hardens the NVL72 Slurm benchmark scripts: results are written to a stable per-job directory, process teardown is targeted rather than broad, and a new coordinator query collector enables post-run analysis.

Based on kjmph's bench33 POC patch.

  • Immutable result directories: benchmark output now lands in result_dir_<SLURM_JOB_ID>/ rather than a fixed path that gets overwritten on every run; latest_result_dir.txt is written alongside as a convenience pointer
  • srun PID tracking: COORD_SRUN_PID and WORKER_SRUN_PIDS are captured and used for targeted kill on exit instead of broad pkill patterns that could terminate unrelated jobs
  • on_exit trap improvements: both run-presto-benchmarks.sh and run-analyze-tables.sh now use consistent on_exit traps that clean up in the right order
  • Port preflight infrastructure: canonicalize_file_path, preflight_file, preflight_image_roles helpers for validating image paths and roles before container launch
  • UCX TLS defaults per variant: CPU gets sysv,tcp,self; GPU keeps existing ^ib,ud:aux,sm; both remain shell-overridable via UCX_TLS
  • collect-coordinator-queries.sh (new): fetches the coordinator's retained /v1/query list and full per-query JSON for post-mortem analysis; works by Slurm job ID or direct URL; uses srun --overlap for zero-extra-allocation Slurm access
  • summarize_coordinator_queries.py (new): stdlib-only TSV report writer that reads the collected JSON and produces summary.tsv + per-query operator_summaries/

Dependencies

No functional dependencies on PRs #1#2. However, the split files (functions.sh, launch-run.sh, run-presto-benchmarks.sh) contain the full staging diff — rebase PRs #4 and #5 on top of this once merged to drop the duplicated hunks.

Verification

  • Run a benchmark job and verify output is written to result_dir_<SLURM_JOB_ID>/ with a latest_result_dir.txt pointing to it
  • Run a second benchmark job and confirm the first job's result directory is not overwritten
  • Kill a benchmark job mid-run and verify the on_exit trap cleanly terminates the coordinator and worker srun processes without leaving orphaned containers
  • Run collect-coordinator-queries.sh <job_id> against a running job; confirm queries.json, per-query JSON files, summary.tsv, and operator_summaries/ are written
  • Run collect-coordinator-queries.sh --server http://host:9200 (direct URL mode) and confirm it works without a Slurm job ID
  • Verify summarize_coordinator_queries.py produces a correctly-formatted TSV with one row per query and truncates long SQL previews at 180 characters
  • Run ./ci/check_style.sh on changed Python and shell files

@copy-pr-bot

copy-pr-bot Bot commented Jul 27, 2026

Copy link
Copy Markdown

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

Based on kjmph's bench33 POC patch.

- Result directories: write benchmark output to result_dir_<jobid>/
  (immutable per job) and emit latest_result_dir.txt symlink pointer
- srun PID tracking: capture COORD_SRUN_PID and WORKER_SRUN_PIDS for
  targeted teardown on exit; replaces broad pkill patterns
- on_exit trap improvements in both run-presto-benchmarks.sh and
  run-analyze-tables.sh
- Port preflight infrastructure: canonicalize_file_path helper,
  preflight_file / preflight_image_roles for pre-launch validation
- UCX TLS defaults per variant: cpu gets sysv,tcp,self; gpu keeps
  existing ^ib,ud:aux,sm default; both remain shell-overridable
- New collect-coordinator-queries.sh: fetches retained /v1/query JSON
  from a live coordinator (by job ID or direct URL) and writes per-query
  JSON + summary TSV via summarize_coordinator_queries.py
- New summarize_coordinator_queries.py: stdlib-only TSV report writer;
  also extracts operatorSummaries into a separate JSON dir
- cluster_config.env.example: document new UCX and result-dir variables
@misiugodfrey
misiugodfrey force-pushed the misiug/bench-slurm-robustness branch from c2ef7d8 to 53ce1ec Compare July 28, 2026 16:03
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