-
Notifications
You must be signed in to change notification settings - Fork 473
reduce PullRequest intensity by ~2x #6141
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
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #6141 +/- ##
=========================================
- Coverage 82.9% 82.8% -0.1%
=========================================
Files 842 842
Lines 377482 377485 +3
=========================================
- Hits 312973 312816 -157
- Misses 64509 64669 +160 🚀 New features to boost your workflow:
|
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.
we already have a built in timer that runs the gossip loop every 100ms. can we use something like proposed here: solana-labs@a789973? can't really get 500ms but could get 400 or 600. i'm good with reducing this frequency but we really need to pay attention to propagation times once this change is running on testnet. to see if maybe push messages aren't propagating as well as we'd like
That logic does not fit into existing code structure unfortunately. Also if we are delayed processing gossip for some reason we'd be issuing pulls every 500 ms rather than every 5 iterations. Also it can never be 400 ms, only 500 or 600 (both of which would be perfectly acceptable if this actually works).
Totally agree, I've got this already running on a testnet node td3n5NGhP7JKWrL638gzau3NY7mF4K3ztZww3GkpywJ |
why not? gossip loop runs at most once every 100ms. could just do:
and then just remove the
what do you mean by this? pull requests will be delayed anyway if this loop is slow to run. |
ok fair i can do the timing in "gossip rounds". in the end it does not really matter. |
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.
thank you for doing this. let's keep an eye metrics as this gets rolled out. maybe update title to say "reduce PullRequest intensity by ~2.5x" to make clear
gossip/src/cluster_info.rs
Outdated
@@ -1502,6 +1511,7 @@ impl ClusterInfo { | |||
&sender, | |||
generate_pull_requests, | |||
); | |||
|
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.
nit: can remove this
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.
Fixed in d562b30
gossip/src/cluster_info.rs
Outdated
@@ -1494,6 +1500,9 @@ impl ClusterInfo { | |||
.map(EpochSpecs::current_epoch_staked_nodes) | |||
.cloned() | |||
.unwrap_or_default(); | |||
|
|||
// Make pull requests every PULL_REQUEST_PERIOD rounds | |||
let generate_pull_requests = gossip_round % PULL_REQUEST_PERIOD == 0; |
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.
nit: could just inline this into run_gossip()
as gossip_round % PULL_REQUEST_PERIOD == 0
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.
Yeah I started with it but this way its more clear what is going on. more LoC but easier to follow.
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.
Fresh look, you are right it is better inline.
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! let's keep an eye on metricsssss
thank you!
Problem
Context: #53
Gossip pull requests are inefficient and expensive Push should be the dominant propagation mechanism in gossip.
Summary of Changes