Skip to content

Conversation

@antonis19
Copy link
Member

Adds a integration commitment bench-lookup --chain=mainnet --datadir <datadir> --sample-size <sample-size> command that bechmarks random key lookups to latest commitment.

Reservoir sampling (https://en.wikipedia.org/wiki/Reservoir_sampling) is used to take a random sample of sample-size keys in one pass.

Some results with a sample of 10M keys from mainnet:

================================================================================
  BENCHMARK RESULTS: Commitment Domain Lookups
================================================================================

  Total Keys in Files: 989960478
  Sampled Keys:        10000000
  Sample Rate:         1.0101%

  Total Lookups:       10000000
  Total Time:          22m34.086304438s
  Throughput:          7380.79 ops/sec
  Avg Value Size:      304.09 bytes

  Latency Statistics:
  -------------------
  Min:                 561ns
  Max:                 94.728663ms
  Mean:                135.408µs
  Std Dev:             146.029µs

  Percentiles:
  ------------
  P50 (Median):        142.716µs
  P90:                 284.412µs
  P95:                 322.403µs
  P99:                 515.173µs
  P99.9:               987.347µs

================================================================================

Geth in comparison:

================================================================================
  BENCHMARK RESULTS: Combined Trie Nodes
================================================================================

  Total Keys in DB:   2452921809
  Sampled Keys:       10000000 (0.4077%)
  Total Lookups:      10000000
  Total Time:         23m59.066456304s
  Throughput:         6945.69 ops/sec
  Avg Value Size:     78.81 bytes

  Latency Statistics:
  -------------------
  Min:                6.422µs
  Max:                25.20701ms
  Mean:               143.906µs
  Std Dev:            61.25µs

  Percentiles:
  ------------
  P50 (Median):       148.208µs
  P90:                183.725µs
  P95:                202.9µs
  P99:                254.067µs
  P99.9:              336.441µs

================================================================================

@AskAlexSharov AskAlexSharov merged commit 23bb235 into main Jan 10, 2026
18 checks passed
@AskAlexSharov AskAlexSharov deleted the commitment-lookup-benchmark branch January 10, 2026 02:41
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.

3 participants