[codex] add evm-only executor load test harness#3658
Draft
codchen wants to merge 14 commits into
Draft
Conversation
|
The latest Buf updates on your PR. Results from workflow Buf / buf (pull_request).
|
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## codex/evmonly-staking-dynamic-gas #3658 +/- ##
=====================================================================
+ Coverage 58.15% 58.35% +0.19%
=====================================================================
Files 2187 2182 -5
Lines 178718 178712 -6
=====================================================================
+ Hits 103939 104291 +352
+ Misses 65454 65234 -220
+ Partials 9325 9187 -138
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
bd57e4c to
7c6c44c
Compare
8e28929 to
4ec8da5
Compare
7c6c44c to
6f9547a
Compare
8cc2094 to
a65459e
Compare
6f9547a to
31f16a8
Compare
fc79ac5 to
e312a84
Compare
31f16a8 to
9cb00d6
Compare
e312a84 to
63b8662
Compare
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.
Summary
Adds a standalone
evmonly-loadtestcommand that feeds generated EVM-only blocks into the EVM-only executor with generated genesis state, configurable result sinks, and Prometheus/stdout throughput metrics.The executor owns the result-sink boundary.
giga/evmonlyexposesResultSinkandWithResultSink, and executor completion invokes the sink for the producedStateChangeSetand receipts before returning. The loadtest harness implements discard/file sink modes through that interface.This branch also pipelines stateless sender recovery ahead of execution:
Executor.PrepareBlockdecodes raw tx RLP and recovers senders intoPreparedBlock.Executor.ExecutePreparedBlockexecutes an already prepared block.ExecuteBlockremains the convenience prepare-then-execute path.evmonly-loadtestnow has--prepare-workers; raw blocks flow through parallel prepare workers into an ordered prepared-block queue consumed by the single external executor worker.The harness supports optimistic no-overlap native transfers and ERC20 transfers. It defaults to unique senders and recipients, supports
--prebuild-blocks, and includes a lightweight async file sink via--result-sink=file --persist-dir=<dir>. Persistence records are append-only RLP records for changesets and receipts, and the sink removes files on normal completion, execution errors, andSIGINT/SIGTERM.Metrics include block input/prepared/finished throughput, prepared tx/s, executed tx/s, gas/s, OCC attempts/fallbacks/conflicts, result-sink queue depth, enqueue wait, write time, bytes written, and record counts.
sink_enqueue_waitis the backpressure signal: if it rises, executor workers are blocked on persistence queue capacity.Validation
go test ./giga/evmonly/...Observed locally:
197,429 TPS,prepare_errors=0,errors=0.Observed locally:
189,483 TPS,prepare_errors=0,errors=0.EC2 Persistent Runs
Run on commit
e312a845b8439fe28824e4bc3aef85cd298ecdd2using a temporaryc8i.48xlargeinus-east-1a, SMT disabled withCoreCount=96,ThreadsPerCore=1, Go1.25.6,GOMAXPROCS=96,GOGC=400, one external executor worker, prebuilt raw blocks, unique senders/recipients, zero gas price/min gas price, and--result-sink=file. The temporary instance and security group were deleted after collecting logs.Native transfer tuned command:
GOMAXPROCS=96 GOGC=400 /tmp/evmonly-loadtest \ --metrics-addr= \ --blocks=1000 \ --txs-per-block=5000 \ --prebuild-blocks \ --builders=96 \ --prepare-workers=24 \ --workers=1 \ --executor-workers=56 \ --gas-price-wei=0 \ --min-gas-price-wei=0 \ --report-interval=5s \ --queue-size=64 \ --result-sink=file \ --persist-dir="$DIR"Observed:
ERC20 transfer tuned command:
GOMAXPROCS=96 GOGC=400 /tmp/evmonly-loadtest \ --metrics-addr= \ --blocks=1000 \ --txs-per-block=5000 \ --prebuild-blocks \ --builders=96 \ --prepare-workers=24 \ --workers=1 \ --executor-workers=64 \ --workload=erc20-transfer \ --gas-price-wei=0 \ --min-gas-price-wei=0 \ --report-interval=5s \ --queue-size=64 \ --result-sink=file \ --persist-dir="$DIR"Observed:
Tuning notes from the same EC2 instance:
--queue-size=64beat512by reducing heap/RSS; native improved from170.2kto178.1k TPSbefore worker tuning.--prepare-workersfrom96to24helped because recovery is no longer the steady-state bottleneck and otherwise competes with execution.--prepare-workers=24 --executor-workers=56,194.0k TPSover 2.5M tx.--prepare-workers=24 --executor-workers=64,170.5k TPSover 2.5M tx.sink_enqueue_wait=0s.Historical Non-Persistent 199.3k Repro
The earlier 199.3k EC2 benchmark was run before persistent sink and prepared pipeline changes, from commit
4ec8da52c, on ac8i.48xlargeinus-east-1awith SMT disabled, Go1.25.6, one external executor worker, prebuilt blocks, unique senders/recipients, and zero gas price/min gas price.Observed:
EC2 Worker Pool / Pinning Follow-up
Commit
63b8662b4bc90936175181b1fff6347c502fb03fadds a persistent OCC worker pool and Linux worker pinning controls. Re-tested on a temporaryc8i.48xlargeinus-east-1a, SMT disabled withCoreCount=96,ThreadsPerCore=1, Go1.25.6,GOMAXPROCS=96,GOGC=400, prebuilt raw blocks, async file persistence, and the same 5M-tx shapes.Native transfer, persistent OCC pool, unpinned:
Native transfer, persistent OCC pool,
--pin-workers --prepare-cpu-offset=0 --executor-cpu-offset=24:ERC20 transfer, persistent OCC pool, unpinned:
ERC20 transfer, persistent OCC pool, pinned:
Conclusion: the persistent OCC pool removes per-block worker creation overhead but does not materially increase core utilization. Native moved from ~184.9k to ~186.6k TPS, while CPU remained around 20-24 effective cores on a 96-core instance. Thread pinning did not help on this workload and slightly reduced CPU utilization in the native case.