Benchmark storage access on block validation#8069
Merged
AndreiEres merged 91 commits intomasterfrom May 22, 2025
Merged
Conversation
Contributor
Author
|
Results I received from a asset-hub-westend snapshot to compare weights from this pr and master. Ran on Apple Macbook M2 Pro. PR, average read: 11_495 Master, average read 24_538 |
839b5c9 to
156dc9d
Compare
alexggh
reviewed
Apr 7, 2025
Base automatically changed from
alexggh/fixup_storage_read_write_benchmark12
to
master
April 8, 2025 10:55
Signed-off-by: Alexandru Gheorghe <alexandru.gheorghe@parity.io>
Signed-off-by: Alexandru Gheorghe <alexandru.gheorghe@parity.io>
Signed-off-by: Alexandru Gheorghe <alexandru.gheorghe@parity.io>
Co-authored-by: Bastian Köcher <git@kchr.de>
Co-authored-by: Bastian Köcher <git@kchr.de>
Co-authored-by: Bastian Köcher <git@kchr.de>
Co-authored-by: Bastian Köcher <git@kchr.de>
Signed-off-by: Alexandru Gheorghe <alexandru.gheorghe@parity.io>
Signed-off-by: Alexandru Gheorghe <alexandru.gheorghe@parity.io>
Co-authored-by: Bastian Köcher <git@kchr.de>
Co-authored-by: Bastian Köcher <git@kchr.de>
github-merge-queue bot
pushed a commit
that referenced
this pull request
May 23, 2025
Discovered while profiling #6131 (comment) with the benchmark #8069 that when running in validation a big chunk of the time is spent inserting and retrieving data from the BTreeMap/BTreeSet. By switching to hashbrown HashMap/HashSet in validation TrieCache and TrieRecorder and the memory-db paritytech/trie#221 read costs improve with around ~40% and write with about ~20% --------- Signed-off-by: Alexandru Gheorghe <alexandru.gheorghe@parity.io> Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>
ordian
added a commit
that referenced
this pull request
May 27, 2025
* master: (99 commits) Snowbridge: Remove asset location check for compatibility (#8473) add poke_deposit extrinsic to pallet-bounties (#8382) litep2p/peerset: Reject non-reserved peers in the reserved-only mode (#8650) Charge deposit based on key length (#8648) [pallet-revive] make subscription task panic on error (#8587) tx/metrics: Add metrics for the RPC v2 `transactionWatch_v1_submitAndWatch` (#8345) Bridges: Fix - Improve try-state for pallet-xcm-bridge-hub (#8615) Introduce CreateBare, deprecated CreateInherent (#7597) Use hashbrown hashmap/hashset in validation context (#8606) ci: rm gitlab config (#8622) 🔪 flaky and Zombienet tests (#8600) cumulus: adjust unincluded segment size metric buckets (#8617) Benchmark storage access on block validation (#8069) Revert 7934 es/remove tj changes (#8611) collator-protocol: add more collation observability (#8230) `fatxpool`: add fallback for ready at light (#8533) txpool: fix tx removal from unlocks set (#8500) XCMP weight metering: account for the MQ page position (#8344) fix epmb solution duplicate issue + add remote mining apparatus to epm (#8585) Fix generated address returned by Substrate RPC runtime call (#8504) ...
github-merge-queue bot
pushed a commit
that referenced
this pull request
May 28, 2025
Modify asset-hub-westend to use the read/write costs in validate block on validator reference hardware, since these are weights that guarantee the blocks will pass validation and make it on the relay chain. This were obtained with the benchmark created here: #8069 and it contains all the optimisation brought by #8607. Fixes: #7537 --------- Signed-off-by: Alexandru Gheorghe <alexandru.gheorghe@parity.io>
pgherveou
pushed a commit
that referenced
this pull request
Jun 11, 2025
Fixes #7987 Fixes #7868 --------- Signed-off-by: Alexandru Gheorghe <alexandru.gheorghe@parity.io> Co-authored-by: Alexandru Gheorghe <alexandru.gheorghe@parity.io> Co-authored-by: Alexandru Gheorghe <49718502+alexggh@users.noreply.github.com> Co-authored-by: Bastian Köcher <git@kchr.de>
pgherveou
pushed a commit
that referenced
this pull request
Jun 11, 2025
Discovered while profiling #6131 (comment) with the benchmark #8069 that when running in validation a big chunk of the time is spent inserting and retrieving data from the BTreeMap/BTreeSet. By switching to hashbrown HashMap/HashSet in validation TrieCache and TrieRecorder and the memory-db paritytech/trie#221 read costs improve with around ~40% and write with about ~20% --------- Signed-off-by: Alexandru Gheorghe <alexandru.gheorghe@parity.io> Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>
pgherveou
pushed a commit
that referenced
this pull request
Jun 11, 2025
Modify asset-hub-westend to use the read/write costs in validate block on validator reference hardware, since these are weights that guarantee the blocks will pass validation and make it on the relay chain. This were obtained with the benchmark created here: #8069 and it contains all the optimisation brought by #8607. Fixes: #7537 --------- Signed-off-by: Alexandru Gheorghe <alexandru.gheorghe@parity.io>
alexggh
added a commit
to alexggh/runtimes
that referenced
this pull request
Sep 22, 2025
Modify asset-hub-kusama to use the read/write costs in validate block on validator reference hardware, since these are weights that guarantee the blocks will pass validation and make it on the relay chain. This were obtained with the benchmark created here: paritytech/polkadot-sdk#8069. Part of: paritytech/polkadot-sdk#6131 Fixes: polkadot-fellows#800 Signed-off-by: Alexandru Gheorghe <alexandru.gheorghe@parity.io>
alvicsam
pushed a commit
that referenced
this pull request
Oct 17, 2025
Fixes #7987 Fixes #7868 --------- Signed-off-by: Alexandru Gheorghe <alexandru.gheorghe@parity.io> Co-authored-by: Alexandru Gheorghe <alexandru.gheorghe@parity.io> Co-authored-by: Alexandru Gheorghe <49718502+alexggh@users.noreply.github.com> Co-authored-by: Bastian Köcher <git@kchr.de>
alvicsam
pushed a commit
that referenced
this pull request
Oct 17, 2025
Discovered while profiling #6131 (comment) with the benchmark #8069 that when running in validation a big chunk of the time is spent inserting and retrieving data from the BTreeMap/BTreeSet. By switching to hashbrown HashMap/HashSet in validation TrieCache and TrieRecorder and the memory-db paritytech/trie#221 read costs improve with around ~40% and write with about ~20% --------- Signed-off-by: Alexandru Gheorghe <alexandru.gheorghe@parity.io> Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>
alvicsam
pushed a commit
that referenced
this pull request
Oct 17, 2025
Modify asset-hub-westend to use the read/write costs in validate block on validator reference hardware, since these are weights that guarantee the blocks will pass validation and make it on the relay chain. This were obtained with the benchmark created here: #8069 and it contains all the optimisation brought by #8607. Fixes: #7537 --------- Signed-off-by: Alexandru Gheorghe <alexandru.gheorghe@parity.io>
alexggh
added a commit
to polkadot-fellows/runtimes
that referenced
this pull request
Dec 1, 2025
Modify asset-hub-kusama to use the read/write costs computed in validate block on validator reference hardware, since these are weights that guarantee the blocks will pass validation and make it on the relay chain. This were obtained with the benchmark created here: paritytech/polkadot-sdk#8069. Part of: #800 --------- Signed-off-by: Alexandru Gheorghe <alexandru.gheorghe@parity.io>
alexggh
added a commit
to polkadot-fellows/runtimes
that referenced
this pull request
Dec 12, 2025
Modify asset-hub-polkadot to use the read/write costs computed in validate block on validator reference hardware, since these are weights that guarantee the blocks will pass validation and make it on the relay chain. This were obtained with the benchmark created here: paritytech/polkadot-sdk#8069. Part of: #800 --------- Signed-off-by: Alexandru Gheorghe <alexandru.gheorghe@parity.io>
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.
Fixes #7987
Fixes #7868