Saltar al contenido

LeiosDB benchmark CLI

Este contenido aún no está disponible en español.

The cmd/leios-db-bench command measures LeiosDB latency across fetch, vote read, serve request reads, and apply read steps.

Run the benchmark with a supported entry point:

Terminal window
make bench-leios-db

Use the cached-read benchmark target to measure a read-through cache scenario. The target passes the value of LEIOS_DB_BENCH_ARGS to the benchmark:

Terminal window
make bench-leios-db-cached
Terminal window
go run ./cmd/leios-db-bench

The latency benchmark supports the following flags:

FlagRole
-volatile-ebsConfigures the volatile EBs used for measurement.
-request-bytesConfigures request sizing.
-job-bytesConfigures job sizing.
-upstream-peersSets the number of upstream peers that share fetch ranges.
-downstream-peersSets the number of downstream peers that share serve requests.
-samplesSets the number of samples collected.
-gc-everyConfigures the garbage collection cadence.
-burstEnables optional burst scheduling.
-burst-sizeConfigures the size of scheduled bursts.
-burst-intervalConfigures the interval between scheduled bursts.
-cached-readsEnables a read-through cache for persisted manifest and closure reads for each endorser block.
-cpuprofileWrites CPU profile diagnostics for the benchmark.
-heapprofileWrites heap profile diagnostics for the benchmark.

Migration note: The following throughput benchmark flags no longer exist. An invocation that passes them fails, so existing scripts must replace them with the current flags above.

  • -pre-populated-ebs
  • -fetch-clients
  • -ebs-per-client
  • -fetch-servers
  • -chain-sel-reads
  • -gc-ticks
  • -runs

The benchmark measures one endorser block at a time across these steps:

  1. Fetch reads the endorser block data.
  2. Vote read reads the vote data for the block.
  3. Serve request reads reads the requested data for downstream peers.
  4. Apply read reads the data used by the apply step.

The benchmark partitions requests and ranges across the configured upstream and downstream peers. Pruning does not advance past endorser blocks with readers still in flight. When the benchmark ends, the optional -burst scheduler stops promptly instead of waiting for its next interval.

The benchmark reports the following values for fetch, vote, serve, and apply:

  • p50 latency
  • p99 latency
  • maximum latency
  • sample count

These results describe latency for each workload step. They do not report throughput or iteration timing.


Doc Holiday logo

Docs authored by Doc Holiday