Performance tweaks (#4340)
* Use Rc to prevent clone of Packets * Fix min => max in banking_stage threads. Coalesce packet buffers better since a larger batch will be faster through banking and sigverify. Deconstruct batches into banking_stage from sigverify since sigverify likes to accumulate batches but then a single banking_stage thread will be stuck with a large batch. Maximize parallelism by creating more chunks of work for banking_stage.
This commit is contained in:
@ -20,13 +20,13 @@ fn producer(addr: &SocketAddr, exit: Arc<AtomicBool>) -> JoinHandle<()> {
|
||||
w.meta.size = PACKET_DATA_SIZE;
|
||||
w.meta.set_addr(&addr);
|
||||
}
|
||||
let msgs_ = msgs.clone();
|
||||
let msgs = Arc::new(msgs);
|
||||
spawn(move || loop {
|
||||
if exit.load(Ordering::Relaxed) {
|
||||
return;
|
||||
}
|
||||
let mut num = 0;
|
||||
for p in &msgs_.packets {
|
||||
for p in &msgs.packets {
|
||||
let a = p.meta.addr();
|
||||
assert!(p.meta.size < BLOB_SIZE);
|
||||
send.send_to(&p.data[..p.meta.size], &a).unwrap();
|
||||
|
Reference in New Issue
Block a user