oxidecomputer / oxidecomputer/propolis

Investigate VirtIO queue sizing

Open
#930 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Rust
Stars
270
Forks
42
Avg merge
4d 5h
Merged PRs (30d)
6

Description

Currently, virtqueue sizes are hard-coded to 256 for both virtio-block and virtio-net (viona) devices exposed to the guest. In "legacy" VirtIO, this is a read-only value, unavailable for the guest to change. On modern (1.x) VirtIO, it is possible for the guest to configure the value, but few do. (Linux does not appear to have logic in place to change the queue size. It simply accepts what the host provides it.)

Consulting viona statistics during benchmarking, we do see cases where we've effectively overrun the guest's ability to service the ring in a timely fashion. We may wish to choose a larger virtqueue size value, keeping in mind that it does have some impact on the resource consumption in the guest. It must allocate pages to house the virtqueue structures, according to its size.

A survey of a moderately sized (4 vCPU 16GB DRAM) VM in GCP show that it exposed a device with 4 VQs per direction (4 RX/TX pairs) sized at 8192 descriptors.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the hard-coded queue size of 256 for the virtio-block and virtio-net (viona) devices, then review the VirtIO legacy and 1.x queue behavior described here. Compare the implementation with the reported viona statistics and GCP device sizing; done should include a supported queue-sizing decision that accounts for guest resource consumption.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
operating-systems
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.