-
Notifications
You must be signed in to change notification settings - Fork 689
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Introduce approval-voting/distribution benchmark #2621
Merged
Merged
Conversation
This file contains 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
Signed-off-by: Andrei Sandu <andrei-mihail@parity.io>
Signed-off-by: Andrei Sandu <andrei-mihail@parity.io>
Signed-off-by: Andrei Sandu <andrei-mihail@parity.io>
The pr migrates: - paritytech/polkadot#7554 Signed-off-by: Alexandru Gheorghe <alexandru.gheorghe@parity.io>
Signed-off-by: Alexandru Gheorghe <alexandru.gheorghe@parity.io>
…tiple_candidates_polkadot_sdk
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>
Signed-off-by: Alexandru Gheorghe <alexandru.gheorghe@parity.io>
…reim/the_v2_assignments
Signed-off-by: Alexandru Gheorghe <alexandru.gheorghe@parity.io>
Signed-off-by: Andrei Sandu <andrei-mihail@parity.io>
…reim/the_v2_assignments Signed-off-by: Andrei Sandu <andrei-mihail@parity.io>
Signed-off-by: Andrei Sandu <andrei-mihail@parity.io>
…reim/the_v2_assignments Signed-off-by: Andrei Sandu <andrei-mihail@parity.io>
Signed-off-by: Andrei Sandu <andrei-mihail@parity.io>
Signed-off-by: Alexandru Gheorghe <alexandru.gheorghe@parity.io>
This reverts commit 5e004e1.
…o feature/approve_multiple_candidates_polkadot_sdk_v2
Signed-off-by: Alexandru Gheorghe <alexandru.gheorghe@parity.io>
Signed-off-by: Alexandru Gheorghe <alexandru.gheorghe@parity.io>
…tiple_candidates_polkadot_sdk_v3
…ple_candidates_polkadot_sdk_v3
... the param was incorrectly appended to v9 instead of creating a new version as v10. Signed-off-by: Alexandru Gheorghe <alexandru.gheorghe@parity.io>
E.g: https://github.com/paritytech/polkadot-sdk/actions/runs/6313437255/job/17141490461?pr=1178 Signed-off-by: Alexandru Gheorghe <alexandru.gheorghe@parity.io>
... failure example here: https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/3799036 Signed-off-by: Alexandru Gheorghe <alexandru.gheorghe@parity.io>
…ple_candidates_polkadot_sdk_v3
AndreiEres
approved these changes
Jan 24, 2024
…rovals-merged-with-andreis-v2
…rovals-merged-with-andreis-v2
Signed-off-by: Alexandru Gheorghe <alexandru.gheorghe@parity.io>
Signed-off-by: Alexandru Gheorghe <alexandru.gheorghe@parity.io>
AndreiEres
reviewed
Jan 30, 2024
Signed-off-by: Alexandru Gheorghe <alexandru.gheorghe@parity.io>
sandreim
approved these changes
Jan 30, 2024
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.
LGTM!
polkadot/node/subsystem-bench/examples/approvals_throughput_best_case.yaml
Outdated
Show resolved
Hide resolved
polkadot/node/subsystem-bench/examples/approvals_throughput_no_optimisations_enabled.yaml
Outdated
Show resolved
Hide resolved
polkadot/node/subsystem-bench/src/approval/message_generator.rs
Outdated
Show resolved
Hide resolved
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>
Addressed all review feedback, once the CI passes will merge this PR. |
This pull request has been mentioned on Polkadot Forum. There might be relevant details there: https://forum.polkadot.network/t/what-are-subsystem-benchmarks/8212/1 |
This was referenced Jun 5, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
R0-silent
Changes should not be mentioned in any release notes
T10-tests
This PR/Issue is related to tests.
T12-benchmarks
This PR/Issue is related to benchmarking and weights.
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
Built on top of the tooling and ideas introduced in #2528, this PR introduces a synthetic benchmark for measuring and assessing the performance characteristics of the approval-voting and approval-distribution subsystems.
Currently this allows, us to simulate the behaviours of these systems based on the following dimensions:
The approach
Benchmarking scenarios
Best case scenario approvals_throughput_best_case.yaml
It send to the approval-distribution only the minimum required tranche to gathered the needed_approvals, so that a candidate is approved.
Behaviour in the presence of no-shows approvals_no_shows.yaml
It sends the tranche needed to approve a candidate when we have a maximum of num_no_shows_per_candidate tranches with no-shows for each candidate.
Maximum throughput approvals_throughput.yaml
It sends all the tranches for each block and measures the used CPU and necessary network bandwidth. by the approval-voting and approval-distribution subsystem.
How to run it
Evaluating performance
Use the real subsystems metrics
If you follow the steps in https://github.com/paritytech/polkadot-sdk/tree/master/polkadot/node/subsystem-bench#install-grafana for installing locally prometheus and grafana, all real metrics for the
approval-distribution
,approval-voting
and overseer are available. E.g:Profile with pyroscope
--profile
as the arguments.Useful logs
Using benchmark to quantify improvements from #1178 + #1191
Using a versi-node we compare the scenarios where all new optimisations are disabled with a scenarios where tranche0 assignments are sent in a single message and a conservative simulation where the coalescing of approvals gives us just 50% reduction in the number of messages we send.
Overall, what we see is a speedup of around 30-40% in the time it takes to process the necessary messages and a 30-40% reduction in the necessary bandwidth.
Best case scenario comparison(minimum required tranches sent).
Unoptimised
vs Optimisation enabled
Worst case all tranches sent, very unlikely happens when sharding breaks.
Unoptimised
vs optimised
TODOs
[x] Polish implementation.
[x] Use what we have so far to evaluate #1191 before merging.
[x] List of features and additional dimensions we want to use for benchmarking.
[x] Run benchmark on hardware similar with versi and kusama nodes.
[ ] Add benchmark to be run in CI for catching regression in performance.
[ ] Rebase on latest changes for network emulation.