Skip to content

Comments

feat(bench): add fusio io probes to compaction benchmark#587

Open
belveryin wants to merge 7 commits intomainfrom
feat/bench-compaction-io-probes
Open

feat(bench): add fusio io probes to compaction benchmark#587
belveryin wants to merge 7 commits intomainfrom
feat/bench-compaction-io-probes

Conversation

@belveryin
Copy link
Collaborator

@belveryin belveryin commented Feb 9, 2026

Closes #586

Summary

Add benchmark-only Fusio IO probes for compaction/read amplification and emit the counters in the compaction benchmark JSON artifact.

What changed

  • Added benchmark-only probed FS wrappers (ProbedLocalFs / ProbedLocalFile) to count:
    • read_ops
    • write_ops
    • bytes_read
    • bytes_written
    • ssts_touched (best effort; unique .parquet paths under /sst/)
  • Integrated counters into artifact schema:
    • scenarios[].setup.io
    • scenarios[].summary.io
  • Reset counters per scenario measurement to avoid cross-scenario leakage.
  • Added DbBuilder::on_durable_fs(...) so the benchmark can inject a wrapped durable FS without changing normal production behavior.
  • Bumped benchmark artifact schema version to 2.

Validation

  • cargo +nightly fmt --all
  • cargo clippy -- -D warnings
  • cargo test
  • cargo bench --bench compaction_local

@belveryin belveryin requested a review from ethe February 10, 2026 09:32
})
}

async fn prepare_read_post_compaction(
Copy link
Member

Choose a reason for hiding this comment

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

Is read_post_compaction intended to mean "first compaction observed" or "compaction quiesced"?

Copy link
Member

Choose a reason for hiding this comment

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

read_post_compaction can start measuring before compaction fully settles, so results may be noisy/inconsistent.

Copy link
Member

@ethe ethe left a comment

Choose a reason for hiding this comment

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

read_baseline/read_post_compaction can panic on valid low-ingest env configs (list_versions returned no versions), which breaks the "env-only tunable benchmark" expectation.

})
}

async fn prepare_read_post_compaction(
Copy link
Member

Choose a reason for hiding this comment

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

read_post_compaction can start measuring before compaction fully settles, so results may be noisy/inconsistent.

@belveryin
Copy link
Collaborator Author

  • Split the old read_post_compaction into two explicit scenarios: read_after_first_compaction_observed and read_compaction_quiesced, with separate wait logic for each.
  • Made low-ingest / no-SST setup non-fatal by skipping inapplicable scenarios with a clear log message instead of panicking.
  • Added strict config validation so TONBO_COMPACTION_BENCH_INGEST_BATCHES must be > 0 and fails fast with an explicit error.

@belveryin belveryin requested a review from ethe February 18, 2026 12:48
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.

bench(compaction): add fusio-level IO probes for compaction/read amplification

2 participants