-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Reset benchmarks by removing post-genesis changes #5435
Conversation
I tested this PR by generating a large chain spec (~85 mb, 100k accounts). I then ran the same benchmark before and after this commit: Before:
After:
So the PR is a huge improvement. From 50 min to 3 min to run the same benchmark. However, The results from the benchmark has changed significantly. Before: Median Slopes: 568 microseconds Raw Data
After: Raw Data
Median: 1925 microseconds |
@shawntabrizi Does the time measurement include calls to |
@arkpar it does not. Only the extrinsic itself. Let me test end to end again. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR makes it significantly faster to run benchmarks with a large chain specification.
Tested again with a 19 mb chain spec containing 100K account keys:
Before:
time ./target/release/substrate benchmark --chain ./substrate-dev-a-bench-revert-final.json --execution=wasm --wasm-execution=compiled --pallet balances --extrinsic "*" --repeat 20 --steps 20 --raw > balances.txt
./target/release/substrate benchmark --chain --execution=wasm --pallet "* 1578.32s user 184.09s system 100% cpu 29:22.07 total
After:
time ./target/release/substrate benchmark --chain ./substrate-dev-a-bench-revert-final.json --execution=wasm --wasm-execution=compiled --pallet balances --extrinsic "*" --repeat 20 --steps 20 --raw > balances.txt
./target/release/substrate benchmark --chain --execution=wasm --pallet "* 148.41s user 77.64s system 149% cpu 2:30.88 total
So I am seeing a 10x improvement here.
However, i will still note that the results of the benchmarks have slowed a bit, but talking with @arkpar it makes sense that if deleting content from the DB causes slowdown, then this is an even more accurate model of what a real DB might be doing.
So this is really great then! Lets merge asap
No description provided.