fullhistory: add bench-ingest subcommand for ingestion benchmarks (#771)#857
Draft
marwen-abid wants to merge 1 commit into
Draft
fullhistory: add bench-ingest subcommand for ingestion benchmarks (#771)#857marwen-abid wants to merge 1 commit into
marwen-abid wants to merge 1 commit into
Conversation
Add `stellar-rpc bench-ingest cold|hot`, benchmarking the production ingest entry points (ingest.WriteColdChunk, ingest.HotService) as they ship — no re-instrumentation. A CSV MetricSink aggregates the engine's existing signals into per-stage percentile reports: one CSV per cold data type, hot.csv, and driver.csv. - Sources: frozen local packs (--source=pack) or the backfill BSB backend (--source=bsb) against GCS or S3; cold runs N chunks with --chunk-workers fan-out, hot caps runs with --num-ledgers. - Guards: takes the daemon's exclusive flocks on every write root, refuses in-place repacks and pre-existing hot DBs, bounds --chunk at the last valid chunk ID. - Failed or interrupted runs persist PARTIAL CSVs for completed work; --out is validated up front. - Supporting: ingest exports DataType*/Stage* label constants (single vocabulary source for sinks), fhtest gains the canonical event-bearing LCM fixture, geometry.LedgerPackPath owns the pack-path formula. Query benchmarks are tracked separately in #856.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds
stellar-rpc bench-ingest cold|hot: benchmarks for the productioningestion paths (
ingest.WriteColdChunk,ingest.HotService). A CSVMetricSinkaggregates the signals the engine already emits intoper-stage percentile reports (one CSV per cold data type,
hot.csv,driver.csv) — no re-instrumentation, the engine under measurement isthe one that ships.
--source=pack) or the backfill BSBbackend (
--source=bsb) against GCS or S3; cold runs N chunks with--chunk-workersfan-out, hot caps runs with--num-ledgers.refuses in-place repacks and pre-existing hot DBs, bounds
--chunkat the last valid chunk ID. Failed/interrupted runs persist PARTIAL
CSVs for completed work.
ingestexportsDataType*/Stage*labelconstants,
fhtest.EventLCMBytesis the canonical event-bearing LCMfixture,
geometry.LedgerPackPathowns the pack-path formula.Example run (real pubnet data from the public S3 lake):
Smoke-tested on pubnet chunk 6100: cold events = 6.15M events, 14.2s of
ingest inside 46.8s wall (rest is S3 download); hot commit fsync
dominates at p50 7ms/ledger, as designed.
Note for CSV consumers:
read_blocked's n is ledgers − 1 — the firstpull (source setup) is excluded so max/total reflect steady-state waits.
Why
We need baseline ingestion numbers for the full-history storage engine —
per-stage cold throughput and hot per-ledger latency — to tune it
(#836), to run the apply-load measurement campaign, and to seed the
bench-in-CI work (#775). Benchmarking the shipped entry points from a
subcommand keeps the numbers honest: what's measured is exactly what
runs in production.
Query benchmarks are split out to #856 (closes #771).