public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Dominik Budzowski <dbudzowski@alfaline.pl>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH qemu-server] Add iothread_vq_mapping support for virtio-blk (PVE 8.4)
Date: Thu, 26 Jun 2025 00:15:34 +0200	[thread overview]
Message-ID: <20250625221535.1688870-1-dbudzowski@alfaline.pl> (raw)

Cover letter for series of patches adding iothread_vq_mapping support to
virtio-blk devices in Proxmox VE 8.4.

This feature was introduced in QEMU 9 and allows mapping multiple vhost
queues onto separate IO threads, dramatically improving RAW block I/O
throughput.

See discussion and background here:
https://blogs.oracle.com/linux/post/virtioblk-using-iothread-vq-mapping

Patches:

  1. drive-iothread-vq-pve8.4.patch
     – extend PVE/QemuServer/Drive.pm to expose `iothread_vq_mapping`
       parameter in `Drive` objects.

  2. qemuserver-iothread-vq-pve8.4.patch
     – update PVE/QemuServer.pm to consume `iothread_vq_mapping`,
       generate `-object iothread,id=…` entries and JSON `-device`
       parameters with separate bus/addr fields.

Installation:

  cp /usr/share/perl5/PVE/QemuServer/Drive.pm \
     /usr/share/perl5/PVE/QemuServer/Drive.pm.backup
  cp /usr/share/perl5/PVE/QemuServer.pm \
     /usr/share/perl5/PVE/QemuServer.pm.backup
  patch /usr/share/perl5/PVE/QemuServer/Drive.pm \
     < drive-iothread-vq-pve8.4.patch
  patch /usr/share/perl5/PVE/QemuServer.pm \
     < qemuserver-iothread-vq-pve8.4.patch
  systemctl restart pvedaemon pveproxy

Usage:

  Add `iothread_vq_mapping=<num>` (2–16) to your disk line in
  `/etc/pve/qemu-server/<VMID>.conf`, for example:

    virtio0: local-lvm:vm-100-disk-0,aio=native,iothread_vq_mapping=8,size=50G

Test Results:

  fio 4k randread RAW:
   - legacy `iothread=1`: ~200k IOPS  
   - new `iothread_vq_mapping=8`: ~800k IOPS  

Please review this series to bring enhanced virtio-blk performance to PVE 8.4.

— 
Dominik Budzowski <dbudzowski@alfaline.pl>

Signed-off-by: Dominik Budzowski <dbudzowski@alfaline.pl>

_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

             reply	other threads:[~2025-06-25 22:15 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-25 22:15 Dominik Budzowski [this message]
2025-06-25 22:15 ` [pve-devel] [PATCH] Add patches for iothread_vq Dominik Budzowski
2025-06-27  7:01   ` DERUMIER, Alexandre via pve-devel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250625221535.1688870-1-dbudzowski@alfaline.pl \
    --to=dbudzowski@alfaline.pl \
    --cc=pve-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal