Skip to content

Use 4 request queues for aggregate virtiofs devices - #41169

Merged
Ben Hillis (benhillis) merged 1 commit into
masterfrom
user/benhill/virtiofs-queue-count
Jul 24, 2026
Merged

Use 4 request queues for aggregate virtiofs devices#41169
Ben Hillis (benhillis) merged 1 commit into
masterfrom
user/benhill/virtiofs-queue-count

Conversation

@benhillis

Copy link
Copy Markdown
Member

Summary

Now that DrvFs shares are carried by a single aggregate virtiofs device (#41129 / #41151), only a small, fixed number of virtiofs devices exist per VM. That leaves enough memory-aperture headroom to give each aggregate 4 request queues instead of 1, significantly improving concurrent DrvFs throughput.

Non-aggregate (per-share file-backed) and section-backed devices stay at a single queue: many of them can exist, and raising their queue count would reintroduce the aperture exhaustion that the one-queue default was added to avoid.

Benchmarks

fio on /mnt/c (16 parallel jobs, psync engine), 4 queues vs 1 queue:

Workload IOPS 4q IOPS 1q Δ IOPS Mean latency
randread 4k 40,282 25,800 +56% −36%
randwrite 4k 33,103 4,584 +622% −85%
smallfile randrw (read) 19,597 13,237 +48% −33%
smallfile randrw (write) 19,563 13,232 +48% −33%
seqread 1M 1,453 1,258 +15% −13%
seqwrite 1M 982 1,095 −10% +11%

Multiqueue is a decisive win on concurrent random/metadata workloads. The only regression is single-stream sequential write (−10%), which is bandwidth-bound rather than concurrency-bound and within run-to-run noise.

Testing

  • Built and deployed on x64; verified the aggregate device (drvfsa) exposes 4 request queues (virtio1-requests.0–3) while per-share devices remain at 1.
  • A/B benchmarked 4q vs 1q builds as above.

Co-authored-by: Copilot 223556219+Copilot@users.noreply.github.com

Copilot AI review requested due to automatic review settings July 24, 2026 22:00
@benhillis
Ben Hillis (benhillis) requested a review from a team as a code owner July 24, 2026 22:00
Now that DrvFs shares are carried by a single aggregate virtiofs device
(#41129 / #41151), only a small, fixed number of virtiofs devices exist
per VM. That leaves enough memory-aperture headroom to give each
aggregate multiple request queues, which significantly improves
concurrent DrvFs throughput.

Non-aggregate (per-share file-backed) and section-backed devices stay at
a single queue: many of them can exist, and raising their queue count
would reintroduce the aperture exhaustion that the one-queue default was
added to avoid.

fio on /mnt/c (16 parallel jobs, psync), 4 queues vs 1:
  randread 4k        +56% IOPS  (-36% latency)
  randwrite 4k       +622% IOPS (-85% latency)
  smallfile randrw   +48% IOPS  (-33% latency)
  seqread 1M         +15% IOPS
  seqwrite 1M        -10% IOPS  (single-stream, bandwidth-bound; within noise)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 4ab64eb9-4271-4241-b838-3da58ec39305
@benhillis
Ben Hillis (benhillis) force-pushed the user/benhill/virtiofs-queue-count branch from 52a9b6b to 276a8e7 Compare July 24, 2026 22:02

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR increases virtio-fs request parallelism for the new aggregate DrvFs virtiofs device(s) by assigning multiple request queues, while keeping non-aggregate devices at a single queue to avoid reintroducing MMIO aperture pressure.

Changes:

  • Set the virtiofs queueCount to 4 for VirtiofsShareKind_Aggregate devices.
  • Keep queueCount at 1 for all other virtiofs device kinds (per-share file-backed and section-backed).

Comment thread src/windows/common/DeviceHostProxy.cpp Outdated
Copilot AI review requested due to automatic review settings July 24, 2026 22:03

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.

@benhillis
Ben Hillis (benhillis) enabled auto-merge (squash) July 24, 2026 23:19
@benhillis
Ben Hillis (benhillis) merged commit c268673 into master Jul 24, 2026
12 checks passed
@benhillis
Ben Hillis (benhillis) deleted the user/benhill/virtiofs-queue-count branch July 24, 2026 23:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants