-
Notifications
You must be signed in to change notification settings - Fork 321
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
Scheduler Frequency Fixes #4545
Changes from all commits
7753852
78bda76
3f0b435
973b9c4
5884d4a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -80,11 +80,10 @@ impl ReceiveAndBuffer for SanitizedTransactionReceiveAndBuffer { | |
count_metrics: &mut SchedulerCountMetrics, | ||
decision: &BufferedPacketsDecision, | ||
) -> Result<usize, ()> { | ||
let remaining_queue_capacity = container.remaining_capacity(); | ||
|
||
const MAX_RECEIVE_PACKETS: usize = 5_000; | ||
const MAX_PACKET_RECEIVE_TIME: Duration = Duration::from_millis(10); | ||
let (recv_timeout, should_buffer) = match decision { | ||
BufferedPacketsDecision::Consume(_) => ( | ||
BufferedPacketsDecision::Consume(_) | BufferedPacketsDecision::Hold => ( | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Behavioral change: There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In the profiles I've been taking so far, we seem to spend exactly 20ms doing nothing in between slots. Curious to see what happens now. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. didn't you recently profile on the box with this change in there? did you see something there? |
||
if container.is_empty() { | ||
MAX_PACKET_RECEIVE_TIME | ||
} else { | ||
|
@@ -93,14 +92,12 @@ impl ReceiveAndBuffer for SanitizedTransactionReceiveAndBuffer { | |
true, | ||
), | ||
BufferedPacketsDecision::Forward => (MAX_PACKET_RECEIVE_TIME, self.forwarding_enabled), | ||
BufferedPacketsDecision::ForwardAndHold | BufferedPacketsDecision::Hold => { | ||
(MAX_PACKET_RECEIVE_TIME, true) | ||
} | ||
BufferedPacketsDecision::ForwardAndHold => (MAX_PACKET_RECEIVE_TIME, true), | ||
}; | ||
|
||
let (received_packet_results, receive_time_us) = measure_us!(self | ||
.packet_receiver | ||
.receive_packets(recv_timeout, remaining_queue_capacity, |packet| { | ||
.receive_packets(recv_timeout, MAX_RECEIVE_PACKETS, |packet| { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Behavioral change: max received number of transactions is 5000. This is a "loose maximum" as it will continue to receive packets up until it has receive >= 5000. This is because the smallest unit we receive is a |
||
packet.check_excessive_precompiles()?; | ||
Ok(packet) | ||
})); | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -105,8 +105,8 @@ impl<C: LikeClusterInfo, R: ReceiveAndBuffer> SchedulerController<C, R> { | |
self.timing_metrics | ||
.maybe_report_and_reset_slot(new_leader_slot); | ||
|
||
self.process_transactions(&decision)?; | ||
self.receive_completed()?; | ||
self.process_transactions(&decision)?; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Behavioral change: receive completed transactions just before scheduling instead of just after. |
||
if self.receive_and_buffer_packets(&decision).is_err() { | ||
break; | ||
} | ||
|
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.
Behavioral change here: break loop if the number of scanned transactions exceed the configured maximum