Bug 1791331 - virtio-blk and virtio-scsi: set num-queues=num-vcpus by default
Summary: virtio-blk and virtio-scsi: set num-queues=num-vcpus by default
Keywords:
Status: CLOSED DUPLICATE of bug 1827722
Alias: None
Product: Red Hat Enterprise Linux Advanced Virtualization
Classification: Red Hat
Component: qemu-kvm
Version: 8.2
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Stefan Hajnoczi
QA Contact: qing.wang
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-01-15 14:53 UTC by Stefan Hajnoczi
Modified: 2021-07-26 09:51 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-07-15 07:30:41 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Stefan Hajnoczi 2020-01-15 14:53:18 UTC
Description of problem:
SMP guests experience increased I/O latencies when the application submits a request on one vcpu and the completion interrupt is handled by another vcpu.  When this happens an Inter-Processor Interrupt (IPI) is required so the second vcpu can wake up the first vcpu.

Users can pin the application to specific vcpus to avoid IPIs, but a cleaner solution that does not involve manual configuration is virtio-blk/scsi multi-queue.

By providing additional virtqueues (one per vcpu) we avoid the need handle completion interrupts on a different vcpu.  Therefore IPIs are not needed and request latency is improved.

QEMU should set the -device virtio-blk,num-queues=N and -device virtio-scsi,num_queues=N properties to the number of vcpus by default.  This will result in additional MSI-X vectors being allocated but otherwise has no drawbacks.

How reproducible:
100%

Steps to Reproduce:
1. Launch a guest with 4 vcpus, latest machine type, one virtio-blk device, and one virtio-scsi device.
2. guest# ls /sys/block/vda/mq | wc -l
3. guest# ls /sys/block/sda/mq | wc -l

Actual results:
2. guest# ls /sys/block/vda/mq | wc -l
1
3. guest# ls /sys/block/sda/mq | wc -l
1

Expected results:
2. guest# ls /sys/block/vda/mq | wc -l
4
3. guest# ls /sys/block/sda/mq | wc -l
4

Comment 1 Stefan Hajnoczi 2020-01-16 11:02:18 UTC
Patches posted upstream:
https://lists.gnu.org/archive/html/qemu-devel/2020-01/msg03283.html

Comment 2 Ademar Reis 2020-02-05 23:12:46 UTC
QEMU has been recently split into sub-components and as a one-time operation to avoid breakage of tools, we are setting the QEMU sub-component of this BZ to "General". Please review and change the sub-component if necessary the next time you review this BZ. Thanks

Comment 5 RHEL Program Management 2021-07-15 07:30:41 UTC
After evaluating this issue, there are no plans to address it further or fix it in an upcoming release.  Therefore, it is being closed.  If plans change such that this issue will be fixed in an upcoming release, then the bug can be reopened.

Comment 6 qing.wang 2021-07-26 09:51:49 UTC
QE agree to close same issue has been tracked by Bug 1827722 - virtio-blk and virtio-scsi multi-queue should be enabled by default

*** This bug has been marked as a duplicate of bug 1827722 ***


Note You need to log in before you can comment on or make changes to this bug.