This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Add benchmarks for for import/validation/production#2579
Merged
skunert merged 25 commits intoparitytech:masterfrom Jun 5, 2023
Merged
Add benchmarks for for import/validation/production#2579skunert merged 25 commits intoparitytech:masterfrom
skunert merged 25 commits intoparitytech:masterfrom
Conversation
Co-authored-by: Anton <anton.kalyaev@gmail.com>
melekes
approved these changes
May 23, 2023
davxy
approved these changes
May 23, 2023
Co-authored-by: Davide Galassi <davxy@datawok.net>
bkchr
approved these changes
May 26, 2023
Member
bkchr
left a comment
There was a problem hiding this comment.
Generally looks good, I mainly left some nitpicks.
| transaction_validity::{InvalidTransaction, TransactionValidityError}, | ||
| }; | ||
|
|
||
| fn create_extrinsics( |
Member
There was a problem hiding this comment.
Why don't you use this from the utils?
Contributor
Author
There was a problem hiding this comment.
Yeah this is a bit of a compromise. I am using the test client for the validate block benchmarks and test service for block production and block import since I wanted to reuse the nice convenience features of the test client block builder.
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Closes #2048
This PR adds some benchmarks to work on. The requirements are specified in #2048.
The goal is to capture the current performance of block import/block production/block validation.
Transfers
First, we have a benchmark that fills a block with transfer_keep_alive transactions until the block is full.
This block is then built/imported/validated.
1313 transfer transactions per block.
Triecache Enabled:
Triecache Disabled:
Compute/IO
In addition to the benchmarking of blocks with transfer extrinsics, I used the glutton pallet
to fully use the weight of a block with configurable compute/IO part. The glutton pallet will just "burn" the leftover weight
of the current block in the
on_idlehook of the pallet. The weight consumed for PoV size and timecan be chosen using the glutton pallets extrinsics.
Note: Throughput is not available for this benchmark since we add no extrinsics.
Triecache Enabled:
Triecache Disabled:
Overall, these benchmark results raise some questions. For the benchmarks that use the glutton pallet, I was expecting the PoV size to have a much larger impact
on the execution time.
Edit: Switched out client block import with
execute_blockfor a more fair comparison, results make more sense now. Block import is fastest, followed by block production. Validate block is slowest due to the constant decoding of storage values.