Skip to content

Commit

Permalink
perf: Queue up CPU * 32 recvs
Browse files Browse the repository at this point in the history
  • Loading branch information
XAMPPRocky committed Oct 22, 2024
1 parent a4f9db1 commit a0c350a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/components/proxy/io_uring_shared.rs
Original file line number Diff line number Diff line change
Expand Up @@ -592,7 +592,12 @@ impl IoUringLoop {
tokens,
};

loop_ctx.enqueue_recv(buffer_pool.clone().alloc());
// Queue a number of recv's to hopefully reduce the number of
// syscalls between data.
for _ in 0..(num_cpus::get() * 32) {
loop_ctx.enqueue_recv(buffer_pool.clone().alloc());
}

loop_ctx
.push_with_token(pending_sends_event.io_uring_entry(), Token::PendingsSends);
loop_ctx.push_with_token(shutdown_event.io_uring_entry(), Token::Shutdown);
Expand Down

0 comments on commit a0c350a

Please sign in to comment.