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
improves sigverify discard_excess_packets performance #22577
Merged
behzadnouri
merged 2 commits into
solana-labs:master
from
behzadnouri:sigverify-drop-packets-ref
Jan 19, 2022
Merged
improves sigverify discard_excess_packets performance #22577
behzadnouri
merged 2 commits into
solana-labs:master
from
behzadnouri:sigverify-drop-packets-ref
Jan 19, 2022
+63
−28
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
As shown by the added benchmark, current code does worse if there is a spam address plus a lot of unique addresses. on current master: test bench_packet_discard_many_senders ... bench: 1,997,960 ns/iter (+/- 103,715) test bench_packet_discard_mixed_senders ... bench: 14,256,116 ns/iter (+/- 534,865) test bench_packet_discard_single_sender ... bench: 1,306,809 ns/iter (+/- 61,992) with this commit: test bench_packet_discard_many_senders ... bench: 1,644,025 ns/iter (+/- 83,715) test bench_packet_discard_mixed_senders ... bench: 1,089,789 ns/iter (+/- 86,324) test bench_packet_discard_single_sender ... bench: 955,234 ns/iter (+/- 55,953)
sakridge
approved these changes
Jan 19, 2022
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
fuck yeah |
Codecov Report
@@ Coverage Diff @@
## master #22577 +/- ##
=======================================
Coverage 81.1% 81.1%
=======================================
Files 560 561 +1
Lines 151206 151303 +97
=======================================
+ Hits 122633 122725 +92
- Misses 28573 28578 +5 |
mergify bot
pushed a commit
that referenced
this pull request
Jan 19, 2022
As shown by the added benchmark, current code does worse if there is a spam address plus a lot of unique addresses. on current master: test bench_packet_discard_many_senders ... bench: 1,997,960 ns/iter (+/- 103,715) test bench_packet_discard_mixed_senders ... bench: 14,256,116 ns/iter (+/- 534,865) test bench_packet_discard_single_sender ... bench: 1,306,809 ns/iter (+/- 61,992) with this commit: test bench_packet_discard_many_senders ... bench: 1,644,025 ns/iter (+/- 83,715) test bench_packet_discard_mixed_senders ... bench: 1,089,789 ns/iter (+/- 86,324) test bench_packet_discard_single_sender ... bench: 955,234 ns/iter (+/- 55,953) (cherry picked from commit dcf44d2) # Conflicts: # core/benches/sigverify_stage.rs # core/src/sigverify_stage.rs
mergify bot
pushed a commit
that referenced
this pull request
Jan 19, 2022
As shown by the added benchmark, current code does worse if there is a spam address plus a lot of unique addresses. on current master: test bench_packet_discard_many_senders ... bench: 1,997,960 ns/iter (+/- 103,715) test bench_packet_discard_mixed_senders ... bench: 14,256,116 ns/iter (+/- 534,865) test bench_packet_discard_single_sender ... bench: 1,306,809 ns/iter (+/- 61,992) with this commit: test bench_packet_discard_many_senders ... bench: 1,644,025 ns/iter (+/- 83,715) test bench_packet_discard_mixed_senders ... bench: 1,089,789 ns/iter (+/- 86,324) test bench_packet_discard_single_sender ... bench: 955,234 ns/iter (+/- 55,953) (cherry picked from commit dcf44d2) # Conflicts: # core/src/sigverify_stage.rs
mergify bot
added a commit
that referenced
this pull request
Jan 19, 2022
… (#22580) * improves sigverify discard_excess_packets performance (#22577) As shown by the added benchmark, current code does worse if there is a spam address plus a lot of unique addresses. on current master: test bench_packet_discard_many_senders ... bench: 1,997,960 ns/iter (+/- 103,715) test bench_packet_discard_mixed_senders ... bench: 14,256,116 ns/iter (+/- 534,865) test bench_packet_discard_single_sender ... bench: 1,306,809 ns/iter (+/- 61,992) with this commit: test bench_packet_discard_many_senders ... bench: 1,644,025 ns/iter (+/- 83,715) test bench_packet_discard_mixed_senders ... bench: 1,089,789 ns/iter (+/- 86,324) test bench_packet_discard_single_sender ... bench: 955,234 ns/iter (+/- 55,953) (cherry picked from commit dcf44d2) # Conflicts: # core/src/sigverify_stage.rs * removes mergify merge conflicts Co-authored-by: behzad nouri <behzadnouri@gmail.com>
mergify bot
added a commit
that referenced
this pull request
Jan 19, 2022
… (#22579) * improves sigverify discard_excess_packets performance (#22577) As shown by the added benchmark, current code does worse if there is a spam address plus a lot of unique addresses. on current master: test bench_packet_discard_many_senders ... bench: 1,997,960 ns/iter (+/- 103,715) test bench_packet_discard_mixed_senders ... bench: 14,256,116 ns/iter (+/- 534,865) test bench_packet_discard_single_sender ... bench: 1,306,809 ns/iter (+/- 61,992) with this commit: test bench_packet_discard_many_senders ... bench: 1,644,025 ns/iter (+/- 83,715) test bench_packet_discard_mixed_senders ... bench: 1,089,789 ns/iter (+/- 86,324) test bench_packet_discard_single_sender ... bench: 955,234 ns/iter (+/- 55,953) (cherry picked from commit dcf44d2) # Conflicts: # core/benches/sigverify_stage.rs # core/src/sigverify_stage.rs * removes mergify merge conflicts Co-authored-by: behzad nouri <behzadnouri@gmail.com>
jstarry
reviewed
Jan 20, 2022
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.
Problem
As shown by the added benchmark, current code does worse if there is a
spam address plus a lot of unique addresses.
on current master:
with this commit:
Summary of Changes
max_packets
with fewer iterations.