Skip to content

go bench read + write receipts/logs for parquet vs pebble#2794

Merged
jewei1997 merged 32 commits intomainfrom
go-bench-receipts-unoptimized
Feb 24, 2026
Merged

go bench read + write receipts/logs for parquet vs pebble#2794
jewei1997 merged 32 commits intomainfrom
go-bench-receipts-unoptimized

Conversation

@jewei1997
Copy link
Contributor

@jewei1997 jewei1997 commented Feb 3, 2026

Summary

  • Add benchmarks comparing pebble vs parquet receipt store read/write performance across realistic workloads (100 blocks with 10-100 receipts per block)
  • using 3000 receipts/block and 5k blocks for writes and 2k blocks for reads (block range is ~100-500 blocks) though.

Writes

  • both pebble and parquet do sync writes to WAL + async writes to underlying store
  • receipt cache is not used in benchmark for more accurate comparison
  • command go test -bench=BenchmarkReceiptWriteAsync -benchtime=1x -run=^$ ./sei-db/ledger_db/receipt/

Reads

  • pebble iterates over each receipt (still uses bloom filters) while parquet issues a SQL-like filter query
  • when hitting ledger cache both are fast as expected but outside of ledger cache, pebble super slow due to need to iterate over each receipt
  • tested over varying concurrency, block range, diff filter criteria (topics, address)
  • command go test -run='^$' -bench 'BenchmarkReceiptReadStore100' -benchtime=1x -count=1 -timeout=30m ./sei-db/ledger_db/receipt/ -v

Benchmark Results

Parquet faster for writes and reads 👍

Writes:
On detached pacific-1 RPC node (EC2 instance with EBS), getting 347,112.00 receipts/s writes using parquet, but only "only" 143,000 receipts/s using pebble

Reads:
Not even comparable. Parquet way faster. 20ms per log for pebble vs 0.05918 ms per log for parquet

@github-actions
Copy link

github-actions bot commented Feb 3, 2026

The latest Buf updates on your PR. Results from workflow Buf / buf (pull_request).

BuildFormatLintBreakingUpdated (UTC)
✅ passed✅ passed✅ passed✅ passedFeb 24, 2026, 9:50 AM

@codecov
Copy link

codecov bot commented Feb 3, 2026

Codecov Report

❌ Patch coverage is 66.66667% with 38 lines in your changes missing coverage. Please review.
✅ Project coverage is 67.71%. Comparing base (1eb6794) to head (98a56be).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
evmrpc/ethbloom/bloom.go 75.36% 14 Missing and 3 partials ⚠️
sei-db/db_engine/pebbledb/mvcc/db.go 21.42% 10 Missing and 1 partial ⚠️
sei-db/ledger_db/parquet/store.go 0.00% 8 Missing ⚠️
evmrpc/filter.go 83.33% 0 Missing and 1 partial ⚠️
sei-db/ledger_db/receipt/receipt_store.go 92.30% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##             main    #2794       +/-   ##
===========================================
+ Coverage   58.14%   67.71%    +9.57%     
===========================================
  Files        2106       45     -2061     
  Lines      173289     6953   -166336     
===========================================
- Hits       100751     4708    -96043     
+ Misses      63596     1694    -61902     
+ Partials     8942      551     -8391     
Flag Coverage Δ
sei-chain 67.65% <66.66%> (+9.54%) ⬆️
sei-db 68.49% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
evmrpc/bloom.go 100.00% <100.00%> (+6.38%) ⬆️
evmrpc/filter.go 70.36% <83.33%> (+1.29%) ⬆️
sei-db/ledger_db/receipt/receipt_store.go 71.89% <92.30%> (-5.08%) ⬇️
sei-db/ledger_db/parquet/store.go 64.68% <0.00%> (-1.76%) ⬇️
sei-db/db_engine/pebbledb/mvcc/db.go 62.77% <21.42%> (-1.21%) ⬇️
evmrpc/ethbloom/bloom.go 75.36% <75.36%> (ø)

... and 2062 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@jewei1997 jewei1997 changed the base branch from parquet-receiptdb to main February 23, 2026 14:24
@jewei1997 jewei1997 changed the title go bench receipts parquet vs pebble go bench read + write receipts/logs for parquet vs pebble Feb 23, 2026
@@ -0,0 +1,126 @@
package ethbloom
Copy link
Contributor Author

Choose a reason for hiding this comment

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

just a refactor, not new code added

Copy link
Contributor

@cody-littley cody-littley left a comment

Choose a reason for hiding this comment

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

LGTM. Take my approval with a grain of salt, since I don't yet have a solid grasp of receipt store architecture.

My main comment is to make sure we do long running tests as well (not a blocker for this PR though).

@jewei1997 jewei1997 merged commit bdaed70 into main Feb 24, 2026
38 of 39 checks passed
@jewei1997 jewei1997 deleted the go-bench-receipts-unoptimized branch February 24, 2026 10:11
yzang2019 added a commit that referenced this pull request Feb 24, 2026
* main:
  go bench read + write receipts/logs for parquet vs pebble (#2794)
  [giga] clear up cache after Write (#2827)
yzang2019 pushed a commit that referenced this pull request Feb 25, 2026
- Add benchmarks comparing pebble vs parquet receipt store read/write
performance across realistic workloads (100 blocks with 10-100 receipts
per block)
- using 3000 receipts/block and 5k blocks for writes and 2k blocks for
reads (block range is ~100-500 blocks) though.

Writes
- both pebble and parquet do sync writes to WAL + async writes to
underlying store
 - receipt cache is not used in benchmark for more accurate comparison
- command `go test -bench=BenchmarkReceiptWriteAsync -benchtime=1x
-run=^$ ./sei-db/ledger_db/receipt/`

Reads
- pebble iterates over each receipt (still uses bloom filters) while
parquet issues a SQL-like filter query
- when hitting ledger cache both are fast as expected but outside of
ledger cache, pebble super slow due to need to iterate over each receipt
- tested over varying concurrency, block range, diff filter criteria
(topics, address)
- command `go test -run='^$' -bench 'BenchmarkReceiptReadStore100'
-benchtime=1x -count=1 -timeout=30m ./sei-db/ledger_db/receipt/ -v`

Parquet faster for writes and reads 👍

Writes:
On detached pacific-1 RPC node (EC2 instance with EBS), getting
347,112.00 receipts/s writes using parquet, but only "only" 143,000
receipts/s using pebble

Reads:
Not even comparable. Parquet way faster. 20ms per log for pebble vs
0.05918 ms per log for parquet
yzang2019 added a commit that referenced this pull request Feb 27, 2026
* main: (66 commits)
  feat(flatkv): include legacyDB in ApplyChangeSets, LtHash, and read path (#2978)
  Deflake mempool tests with Eventually-based block waits (#2983)
  Demote noisy gasless classification log to debug level (#2982)
  Harden `TestStateLock_NoPOL` against proposal/timeout race (#2980)
  added a config parameter to limit outbound p2p connections. (#2974)
  merged unconditional and persistent peers status (#2977)
  Fix race between file pruning and in-flight parquet queries (#2975)
  fix(giga): don't migrate balance on failed txs (#2961)
  Fix hanging upgrade tests by adding timeouts to wait_for_height (#2976)
  Add snapshot import for Giga Live State (#2970)
  Fix Rocksdb MVCC read timestamp lifetime for iterators (#2971)
  Reduce exposed tendermint RPC endpoint (#2968)
  Deflake `TestStateLock_NoPOL` by widening propose timeout in test (#2969)
  go bench read + write receipts/logs for parquet vs pebble (#2794)
  [giga] clear up cache after Write (#2827)
  fix: use correct EVM storage key prefix in benchmark key generation (#2966)
  Harden staking precompile test against CI flakiness (#2967)
  Don't sync flatKV DBs when committing  (#2964)
  Fix flaky `TestStateLock_POLSafety1` (#2962)
  Add metrics for historical proof success/failure rate (#2958)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants