Skip to content

Add independent pipeline auto-tuning tool#14

Open
Toti330 wants to merge 5 commits into
mainfrom
feat/auto-tuning
Open

Add independent pipeline auto-tuning tool#14
Toti330 wants to merge 5 commits into
mainfrom
feat/auto-tuning

Conversation

@Toti330

@Toti330 Toti330 commented Jul 13, 2026

Copy link
Copy Markdown
Collaborator

Summary

Adds tools/tune_pipeline.py, a standalone external benchmark orchestrator for worker threads, writer threads, and commit count.

Why this is useful

It replaces ad-hoc one-off environment changes with repeatable, randomized sweeps. Each candidate runs 3 times by default, reports min/median/max throughput, and recommends the smallest candidate within 95.00% of the best median. It also reports the efficient ceiling before performance falls below that threshold.

Implementation

  • Supports independent --test worker, --test writer, and --test commit sweeps.
  • Uses time.perf_counter() outside the application, avoiding application throughput-reporting artifacts.
  • --dry-run executes 0 workloads and changes 0 files.
  • --test-only sets TEST_ONLY=1: it requires an existing schema, bypasses schema/checkpoint work, and rolls each COPY transaction back so it persists 0 rows.
  • Persistent writer/commit tests require --allow-db-writes and explicit --start-seed.
  • --apply-to requests confirmation for every individual environment setting; rejecting one continues with the remaining recommendations.
  • Includes 4 Python unit tests for recommendation, Docker argument expansion, environment-file updates, and partial confirmation.

Independence

This PR is based directly on main and can be reviewed or merged independently. It does not require the other diagnostics branches.

Verification

  • python3 -m unittest -v test_tune_pipeline.py: 4 passed.
  • python3 -m py_compile tune_pipeline.py test_tune_pipeline.py passed.
  • cargo test --all-targets passed.
  • Docker writer dry-run showed TEST_ONLY=1 and CHECKPOINT_FREQUENCY=none.

Generated by GPT-5.6 Terra & Sol. Ideas from the author; implementation by AI.

@Toti330
Toti330 requested a review from SuperB3333 July 14, 2026 22:24
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