-
Notifications
You must be signed in to change notification settings - Fork 11.2k
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
[Narwhal] Add a min_header_delay
parameter
#7970
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 4 Ignored Deployments
|
c597658
to
7f2f698
Compare
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.
Nice!
NetworkModel::PartiallySynchronous | ||
if self.committee.leader(self.round + 1) == self.name => | ||
{ | ||
Duration::ZERO |
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.
cool :)
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.
Awesome! Just curious what are the effects to dag performance if we hit the min timeout eventually and add empty headers?
narwhal/primary/src/proposer.rs
Outdated
// Nothing to do. | ||
// Check whether any timer expired. | ||
() = &mut max_delay_timer, if !max_delay_timed_out => { | ||
// Continue to next ieration of the loop. |
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.
s/ieration/iteration (same in the below comment)
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.
Great addition! 👍
NetworkModel::PartiallySynchronous | ||
if self.committee.leader(self.round + 1) == self.name => | ||
{ | ||
Duration::ZERO |
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.
Nice 👍
with = "duration_format", | ||
default = "Parameters::default_min_header_delay" | ||
)] | ||
pub min_header_delay: Duration, |
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.
Could you please also update the README file under the benchmark folder to include the newly introduced parameter?
If this happens, the network must have very low load. Generating headers at 1/s ~ 2/s should be ok. And the benefit would be lower latencies. |
95bbc80
to
e038e2f
Compare
Spoke with Mingwei offline about this, but in the case we do under tune this parameter it is possible we will generate empty headers. Just something to monitor for the future |
e038e2f
to
03262d4
Compare
This allows proposing headers before reaching batch threshold. Also, ensure leader only needs to wait for parent stakes and nothing else.
03262d4
to
b07db11
Compare
Currently we are trying to use the header batches threshold to determine the speed of generating headers, which depends on the rate of batch creations, which in turn depends on the write rate. Instead, adding a new `min_header_delay` parameter, which allows proposing headers before reaching batch threshold, would make the header propose latency more predictable especially under lower TPS. For now, the `min_header_delay` is set to 1.8s, only slightly below `max_header_delay`, to separate behavior change from this PR. We will run experiments on different values. One possibility as @arun-koshy proposed is to set `min_header_delay` to 1s and `max_header_delay` to 5s. Also, ensure leader only needs to wait for parent stakes and nothing else.
Currently we are trying to use the header batches threshold to determine the speed of generating headers, which depends on the rate of batch creations, which in turn depends on the write rate. Instead, adding a new `min_header_delay` parameter, which allows proposing headers before reaching batch threshold, would make the header propose latency more predictable especially under lower TPS. For now, the `min_header_delay` is set to 1.8s, only slightly below `max_header_delay`, to separate behavior change from this PR. We will run experiments on different values. One possibility as @arun-koshy proposed is to set `min_header_delay` to 1s and `max_header_delay` to 5s. Also, ensure leader only needs to wait for parent stakes and nothing else.
Currently we are trying to use the header batches threshold to determine the speed of generating headers, which depends on the rate of batch creations, which in turn depends on the write rate. Instead, adding a new `min_header_delay` parameter, which allows proposing headers before reaching batch threshold, would make the header propose latency more predictable especially under lower TPS. For now, the `min_header_delay` is set to 1.8s, only slightly below `max_header_delay`, to separate behavior change from this PR. We will run experiments on different values. One possibility as @arun-koshy proposed is to set `min_header_delay` to 1s and `max_header_delay` to 5s. Also, ensure leader only needs to wait for parent stakes and nothing else.
Currently we are trying to use the header batches threshold to determine the speed of generating headers, which depends on the rate of batch creations, which in turn depends on the write rate. Instead, adding a new `min_header_delay` parameter, which allows proposing headers before reaching batch threshold, would make the header propose latency more predictable especially under lower TPS. For now, the `min_header_delay` is set to 1.8s, only slightly below `max_header_delay`, to separate behavior change from this PR. We will run experiments on different values. One possibility as @arun-koshy proposed is to set `min_header_delay` to 1s and `max_header_delay` to 5s. Also, ensure leader only needs to wait for parent stakes and nothing else.
Currently we are trying to use the header batches threshold to determine the speed of generating headers, which depends on the rate of batch creations, which in turn depends on the write rate. Instead, adding a new `min_header_delay` parameter, which allows proposing headers before reaching batch threshold, would make the header propose latency more predictable especially under lower TPS. For now, the `min_header_delay` is set to 1.8s, only slightly below `max_header_delay`, to separate behavior change from this PR. We will run experiments on different values. One possibility as @arun-koshy proposed is to set `min_header_delay` to 1s and `max_header_delay` to 5s. Also, ensure leader only needs to wait for parent stakes and nothing else.
Currently we are trying to use the header batches threshold to determine the speed of generating headers, which depends on the rate of batch creations, which in turn depends on the write rate. Instead, adding a new `min_header_delay` parameter, which allows proposing headers before reaching batch threshold, would make the header propose latency more predictable especially under lower TPS. For now, the `min_header_delay` is set to 1.8s, only slightly below `max_header_delay`, to separate behavior change from this PR. We will run experiments on different values. One possibility as @arun-koshy proposed is to set `min_header_delay` to 1s and `max_header_delay` to 5s. Also, ensure leader only needs to wait for parent stakes and nothing else.
Currently we are trying to use the header batches threshold to determine the speed of generating headers, which depends on the rate of batch creations, which in turn depends on the write rate. Instead, adding a new `min_header_delay` parameter, which allows proposing headers before reaching batch threshold, would make the header propose latency more predictable especially under lower TPS. For now, the `min_header_delay` is set to 1.8s, only slightly below `max_header_delay`, to separate behavior change from this PR. We will run experiments on different values. One possibility as @arun-koshy proposed is to set `min_header_delay` to 1s and `max_header_delay` to 5s. Also, ensure leader only needs to wait for parent stakes and nothing else.
Currently we are trying to use the header batches threshold to determine the speed of generating headers, which depends on the rate of batch creations, which in turn depends on the write rate. Instead, adding a new
min_header_delay
parameter, which allows proposing headers before reaching batch threshold, would make the header propose latency more predictable especially under lower TPS.For now, the
min_header_delay
is set to 1.8s, only slightly belowmax_header_delay
, to separate behavior change from this PR. We will run experiments on different values. One possibility as @arun-koshy proposed is to setmin_header_delay
to 1s andmax_header_delay
to 5s.Also, ensure leader only needs to wait for parent stakes and nothing else.