Skip to content

Commit

Permalink
net: revert virtio-net queue size to 256
Browse files Browse the repository at this point in the history
Changing the queue size from 256 to 512 increases RX throughput but
seems to regress TX throughput by 3% on average. We are not sure what is
causing this. Revert this change until we have enough time to
investigate and understand better the mechanisms that are in play.

Signed-off-by: Babis Chalios <[email protected]>
  • Loading branch information
bchalios authored and ShadowCurse committed Nov 6, 2024
1 parent b60bcb2 commit 0614ed7
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
4 changes: 0 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,6 @@ and this project adheres to

### Changed

- [#4875](https://github.com/firecracker-microvm/firecracker/pull/4875):
Increase default queue size for the `virtio-net` device from 256 to 512. This
decreases wait time between guest and vmm threads for network packets
processing and allows for more throughput.
- [#4844](https://github.com/firecracker-microvm/firecracker/pull/4844): Upgrade
`virtio-net` device to use `readv` syscall to avoid unnecessary memory copies
on RX path, increasing the RX performance.
Expand Down
2 changes: 1 addition & 1 deletion src/vmm/src/devices/virtio/net/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
use std::io;

/// Maximum size of the queue for network device.
pub const NET_QUEUE_MAX_SIZE: u16 = 512;
pub const NET_QUEUE_MAX_SIZE: u16 = 256;
/// Maximum size of the frame buffers handled by this device.
pub const MAX_BUFFER_SIZE: usize = 65562;
/// The number of queues of the network device.
Expand Down

0 comments on commit 0614ed7

Please sign in to comment.