Skip to content

feat(presto/bench): config buffer tuning and benchmark robustness fixes - #390

Open
misiugodfrey wants to merge 4 commits into
mainfrom
misiug/bench-fixes-tuning
Open

feat(presto/bench): config buffer tuning and benchmark robustness fixes#390
misiugodfrey wants to merge 4 commits into
mainfrom
misiug/bench-fixes-tuning

Conversation

@misiugodfrey

@misiugodfrey misiugodfrey commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Summary

Low-risk correctness fixes and config tuning for Presto native benchmarks. Good first merge of this series.

Based on kjmph's bench33 POC patch.

  • run_benchmark.sh: add --maxfail=1 when --profile is set (avoids waiting for all queries when one fails during profiling runs); add PRESTO_BENCHMARK_KEEP_VENV escape hatch
  • common_functions.sh: replace jq-based wait_for_worker_node_registration with python3 JSON parse; fix broken while-loop that was not actually retrying correctly
  • common_fixtures.py: fix error handling for non-Presto exceptions in failed_queries_dict; move REST metrics collection outside the profiler interval so profiling overhead doesn't skew results; add PRESTO_SESSION_PROPERTIES env var for per-run session overrides
  • hive.properties: comment out SOFT_AFFINITY in base template; keep it in the CPU-specific override (overrides/cpu/) only — GPU experiments should opt in explicitly
  • Config overrides: exchange.max-response-size=64MB for CPU coordinator; lower CPU worker buffer defaults to 32MB; add local-exchange.max-buffer-size and largest-size-class-pages; tune GPU exchange/sink buffer sizes
  • .gitignore: add result_dir_*/ and latest_result_dir.txt (introduced by PR Land @bdice prototype workflows in main for testing #3 of this series)

Dependencies

None. This PR is self-contained and should merge first.

Note: common_functions.sh, run_benchmark.sh, and common_fixtures.py overlap with the open dmakkar/qol-fixes branch. The common_fixtures.py changes touch the same fixture function — whichever merges second will need a manual merge. Coordinate before landing.

Verification

  • Run a GPU TPC-H benchmark end-to-end on the NVL72 cluster; confirm results land in result_dir_<jobid>/ and latest_result_dir.txt is written
  • Run a CPU TPC-H benchmark with --profile; verify benchmark aborts after the first query failure instead of continuing through all 22 queries
  • Run presto/scripts/run_benchmark.sh and confirm the PRESTO_BENCHMARK_KEEP_VENV=1 escape hatch skips venv teardown
  • Verify wait_for_worker_node_registration retries correctly when workers are slow to register (previously the loop exited immediately on the first iteration)
  • Confirm common_fixtures.py metrics are collected after the profiler window closes (check that QueryStats REST calls don't appear inside the nsys/perf capture interval in logs)
  • Run ./ci/check_style.sh (ruff + codespell) on changed Python 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.

@misiugodfrey
misiugodfrey force-pushed the misiug/bench-fixes-tuning branch from 4d119ee to 4fd0ca2 Compare July 27, 2026 22:05
Based on kjmph's bench33 POC patch.

- run_benchmark.sh: add --maxfail=1 when --profile is set; add
  PRESTO_BENCHMARK_KEEP_VENV escape hatch to skip venv teardown
- common_functions.sh: replace jq-based worker registration wait with
  python3 JSON parse; fix while-loop so it actually retries correctly
- common_fixtures.py: fix error handling for non-Presto exceptions in
  failed_queries_dict; move REST metrics collection outside profiler
  interval; add PRESTO_SESSION_PROPERTIES env var support
- hive.properties: comment out SOFT_AFFINITY in base template; keep in
  CPU-specific override only
- Config overrides: exchange.max-response-size=64MB for CPU coordinator;
  lower buffer defaults to 32MB for CPU workers; add local-exchange and
  largest-size-class-pages knobs; tune GPU exchange/sink buffer sizes
- .gitignore: add result_dir_*/ and latest_result_dir.txt
@misiugodfrey
misiugodfrey force-pushed the misiug/bench-fixes-tuning branch from 4fd0ca2 to 47b0a20 Compare July 28, 2026 16:03
_session_properties_from_env() calls os.environ.get() but os was not
imported, causing NameError on every presto_cursor fixture initialization.
@copy-pr-bot

copy-pr-bot Bot commented Jul 28, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

The native worker rejects DataSize suffixes (MB) for this property;
express 512MB as raw bytes instead.
…iner

The container root is read-only squashfs so /root/.libcudf is not
writable, causing libcudf JIT/RTC cache creation to fail. Bind-mount
a per-worker host directory to provide the writable path.
@misiugodfrey misiugodfrey self-assigned this Jul 29, 2026

# CPU UCX row pages and local exchange were tuned together. The generator
# reapplies these as overridable CPU_* values on every run.
local-exchange.max-buffer-size=536870912

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Note that these values can't have units associated with them (MB for instance), so we need to leave this as a byte value.

while true; do
if curl -s -f -o node_response.json "${COORDINATOR_URL}/v1/node"; then
node_count=$(python3 -c \
'import json, sys; print(len(json.load(open(sys.argv[1]))))' \

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

replaced jq with python parsing since jq is not installed in the cluster/coordinator image by default.

@misiugodfrey
misiugodfrey marked this pull request as ready for review July 29, 2026 18:47
@misiugodfrey
misiugodfrey requested a review from a team as a code owner July 29, 2026 18:47
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