public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH qemu-server 0/6] improve virtio drive multiqueues
@ 2023-03-09  8:52 Alexandre Derumier
  2023-03-09  8:52 ` [pve-devel] [PATCH qemu-server 1/6] add virtio-scsi && virtio-scsi-single tests Alexandre Derumier
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Alexandre Derumier @ 2023-03-09  8:52 UTC (permalink / raw)
  To: pve-devel

Hi,

This patch series add support for virtio-blk num-queues.
It's was already implemented for virtio-scsi.

It's also enable numqueue to maxcpus for qemu 8.0.
Redhat already was enabled by default in rhev in 2011,
so it's pretty stable.
https://bugzilla.redhat.com/show_bug.cgi?id=1827722

It's improve performance for fast storage like nvme,optane
by around 20%.
My fio bench have jump from 200k to 240k iops with 4 block

I don't have seen perf regression (running them for 1month),
but user is still able to override queues and set it to 1.


Alexandre Derumier (6):
  add virtio-scsi && virtio-scsi-single tests
  virtio-blk: add queues option
  cpuconfig: add get_cpu_topology helper
  fix #4295 : virtio-(blk|scsi): enable multiqueue by default
  drive: allow minimum queues = 1
  add virtio-blk|scsi default multiqueue tests

 PVE/QemuServer.pm                             | 36 ++++++++++++-------
 PVE/QemuServer/CPUConfig.pm                   | 11 ++++++
 PVE/QemuServer/Drive.pm                       |  3 +-
 test/cfg2cmd/simple-virtio-blk-8.0.conf       | 13 +++++++
 test/cfg2cmd/simple-virtio-blk-8.0.conf.cmd   | 31 ++++++++++++++++
 .../simple-virtio-scsi-single-8.0.conf        | 14 ++++++++
 .../simple-virtio-scsi-single-8.0.conf.cmd    | 33 +++++++++++++++++
 test/cfg2cmd/simple-virtio-scsi-single.conf   | 14 ++++++++
 .../simple-virtio-scsi-single.conf.cmd        | 33 +++++++++++++++++
 test/cfg2cmd/simple-virtio-scsi.conf          | 14 ++++++++
 test/cfg2cmd/simple-virtio-scsi.conf.cmd      | 31 ++++++++++++++++
 11 files changed, 219 insertions(+), 14 deletions(-)
 create mode 100644 test/cfg2cmd/simple-virtio-blk-8.0.conf
 create mode 100644 test/cfg2cmd/simple-virtio-blk-8.0.conf.cmd
 create mode 100644 test/cfg2cmd/simple-virtio-scsi-single-8.0.conf
 create mode 100644 test/cfg2cmd/simple-virtio-scsi-single-8.0.conf.cmd
 create mode 100644 test/cfg2cmd/simple-virtio-scsi-single.conf
 create mode 100644 test/cfg2cmd/simple-virtio-scsi-single.conf.cmd
 create mode 100644 test/cfg2cmd/simple-virtio-scsi.conf
 create mode 100644 test/cfg2cmd/simple-virtio-scsi.conf.cmd

-- 
2.30.2




^ permalink raw reply	[flat|nested] 7+ messages in thread

* [pve-devel] [PATCH qemu-server 1/6] add virtio-scsi && virtio-scsi-single tests
  2023-03-09  8:52 [pve-devel] [PATCH qemu-server 0/6] improve virtio drive multiqueues Alexandre Derumier
@ 2023-03-09  8:52 ` Alexandre Derumier
  2023-03-09  8:52 ` [pve-devel] [PATCH qemu-server 2/6] virtio-blk: add queues option Alexandre Derumier
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Alexandre Derumier @ 2023-03-09  8:52 UTC (permalink / raw)
  To: pve-devel

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
---
 test/cfg2cmd/simple-virtio-scsi-single.conf   | 14 ++++++++
 .../simple-virtio-scsi-single.conf.cmd        | 33 +++++++++++++++++++
 test/cfg2cmd/simple-virtio-scsi.conf          | 14 ++++++++
 test/cfg2cmd/simple-virtio-scsi.conf.cmd      | 31 +++++++++++++++++
 4 files changed, 92 insertions(+)
 create mode 100644 test/cfg2cmd/simple-virtio-scsi-single.conf
 create mode 100644 test/cfg2cmd/simple-virtio-scsi-single.conf.cmd
 create mode 100644 test/cfg2cmd/simple-virtio-scsi.conf
 create mode 100644 test/cfg2cmd/simple-virtio-scsi.conf.cmd

diff --git a/test/cfg2cmd/simple-virtio-scsi-single.conf b/test/cfg2cmd/simple-virtio-scsi-single.conf
new file mode 100644
index 0000000..982702d
--- /dev/null
+++ b/test/cfg2cmd/simple-virtio-scsi-single.conf
@@ -0,0 +1,14 @@
+# TEST: Test for a basic configuration with a virtio-scsi-single IOThread disk
+# QEMU_VERSION: 5.0
+bootdisk: scsi0
+cores: 3
+ide2: none,media=cdrom
+memory: 768
+name: simple
+numa: 0
+ostype: l26
+smbios1: uuid=7b10d7af-b932-4c66-b2c3-3996152ec465
+sockets: 1
+scsihw: virtio-scsi-single
+scsi0: local:8006/vm-8006-disk-0.qcow2,discard=on,iothread=1,size=104858K
+vmgenid: c773c261-d800-4348-9f5d-167fadd53cf8
diff --git a/test/cfg2cmd/simple-virtio-scsi-single.conf.cmd b/test/cfg2cmd/simple-virtio-scsi-single.conf.cmd
new file mode 100644
index 0000000..374bd96
--- /dev/null
+++ b/test/cfg2cmd/simple-virtio-scsi-single.conf.cmd
@@ -0,0 +1,33 @@
+/usr/bin/kvm \
+  -id 8006 \
+  -name 'simple,debug-threads=on' \
+  -no-shutdown \
+  -chardev 'socket,id=qmp,path=/var/run/qemu-server/8006.qmp,server=on,wait=off' \
+  -mon 'chardev=qmp,mode=control' \
+  -chardev 'socket,id=qmp-event,path=/var/run/qmeventd.sock,reconnect=5' \
+  -mon 'chardev=qmp-event,mode=control' \
+  -pidfile /var/run/qemu-server/8006.pid \
+  -daemonize \
+  -smbios 'type=1,uuid=7b10d7af-b932-4c66-b2c3-3996152ec465' \
+  -smp '3,sockets=1,cores=3,maxcpus=3' \
+  -nodefaults \
+  -boot 'menu=on,strict=on,reboot-timeout=1000,splash=/usr/share/qemu-server/bootsplash.jpg' \
+  -vnc 'unix:/var/run/qemu-server/8006.vnc,password=on' \
+  -cpu kvm64,enforce,+kvm_pv_eoi,+kvm_pv_unhalt,+lahf_lm,+sep \
+  -m 768 \
+  -object 'iothread,id=iothread-virtioscsi0' \
+  -device 'pci-bridge,id=pci.1,chassis_nr=1,bus=pci.0,addr=0x1e' \
+  -device 'pci-bridge,id=pci.2,chassis_nr=2,bus=pci.0,addr=0x1f' \
+  -device 'pci-bridge,id=pci.3,chassis_nr=3,bus=pci.0,addr=0x5' \
+  -device 'vmgenid,guid=c773c261-d800-4348-9f5d-167fadd53cf8' \
+  -device 'piix3-usb-uhci,id=uhci,bus=pci.0,addr=0x1.0x2' \
+  -device 'usb-tablet,id=tablet,bus=uhci.0,port=1' \
+  -device 'VGA,id=vga,bus=pci.0,addr=0x2' \
+  -device 'virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3' \
+  -iscsi 'initiator-name=iqn.1993-08.org.debian:01:aabbccddeeff' \
+  -drive 'if=none,id=drive-ide2,media=cdrom,aio=threads' \
+  -device 'ide-cd,bus=ide.1,unit=0,drive=drive-ide2,id=ide2,bootindex=200' \
+  -device 'virtio-scsi-pci,id=virtioscsi0,bus=pci.3,addr=0x1,iothread=iothread-virtioscsi0' \
+  -drive 'file=/var/lib/vz/images/8006/vm-8006-disk-0.qcow2,if=none,id=drive-scsi0,discard=on,format=qcow2,cache=none,aio=native,detect-zeroes=unmap' \
+  -device 'scsi-hd,bus=virtioscsi0.0,channel=0,scsi-id=0,lun=0,drive=drive-scsi0,id=scsi0,bootindex=100' \
+  -machine 'type=pc+pve0'
diff --git a/test/cfg2cmd/simple-virtio-scsi.conf b/test/cfg2cmd/simple-virtio-scsi.conf
new file mode 100644
index 0000000..b32a3df
--- /dev/null
+++ b/test/cfg2cmd/simple-virtio-scsi.conf
@@ -0,0 +1,14 @@
+# TEST: Test for a basic configuration with a virtio-scsi disk
+# QEMU_VERSION: 5.0
+bootdisk: scsi0
+cores: 3
+ide2: none,media=cdrom
+memory: 768
+name: simple
+numa: 0
+ostype: l26
+smbios1: uuid=7b10d7af-b932-4c66-b2c3-3996152ec465
+sockets: 1
+scsihw: virtio-scsi
+scsi0: local:8006/vm-8006-disk-0.qcow2,discard=on,size=104858K
+vmgenid: c773c261-d800-4348-9f5d-167fadd53cf8
diff --git a/test/cfg2cmd/simple-virtio-scsi.conf.cmd b/test/cfg2cmd/simple-virtio-scsi.conf.cmd
new file mode 100644
index 0000000..c25eed9
--- /dev/null
+++ b/test/cfg2cmd/simple-virtio-scsi.conf.cmd
@@ -0,0 +1,31 @@
+/usr/bin/kvm \
+  -id 8006 \
+  -name 'simple,debug-threads=on' \
+  -no-shutdown \
+  -chardev 'socket,id=qmp,path=/var/run/qemu-server/8006.qmp,server=on,wait=off' \
+  -mon 'chardev=qmp,mode=control' \
+  -chardev 'socket,id=qmp-event,path=/var/run/qmeventd.sock,reconnect=5' \
+  -mon 'chardev=qmp-event,mode=control' \
+  -pidfile /var/run/qemu-server/8006.pid \
+  -daemonize \
+  -smbios 'type=1,uuid=7b10d7af-b932-4c66-b2c3-3996152ec465' \
+  -smp '3,sockets=1,cores=3,maxcpus=3' \
+  -nodefaults \
+  -boot 'menu=on,strict=on,reboot-timeout=1000,splash=/usr/share/qemu-server/bootsplash.jpg' \
+  -vnc 'unix:/var/run/qemu-server/8006.vnc,password=on' \
+  -cpu kvm64,enforce,+kvm_pv_eoi,+kvm_pv_unhalt,+lahf_lm,+sep \
+  -m 768 \
+  -device 'pci-bridge,id=pci.1,chassis_nr=1,bus=pci.0,addr=0x1e' \
+  -device 'pci-bridge,id=pci.2,chassis_nr=2,bus=pci.0,addr=0x1f' \
+  -device 'vmgenid,guid=c773c261-d800-4348-9f5d-167fadd53cf8' \
+  -device 'piix3-usb-uhci,id=uhci,bus=pci.0,addr=0x1.0x2' \
+  -device 'usb-tablet,id=tablet,bus=uhci.0,port=1' \
+  -device 'VGA,id=vga,bus=pci.0,addr=0x2' \
+  -device 'virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3' \
+  -iscsi 'initiator-name=iqn.1993-08.org.debian:01:aabbccddeeff' \
+  -drive 'if=none,id=drive-ide2,media=cdrom,aio=threads' \
+  -device 'ide-cd,bus=ide.1,unit=0,drive=drive-ide2,id=ide2,bootindex=200' \
+  -device 'virtio-scsi,id=scsihw0,bus=pci.0,addr=0x5' \
+  -drive 'file=/var/lib/vz/images/8006/vm-8006-disk-0.qcow2,if=none,id=drive-scsi0,discard=on,format=qcow2,cache=none,aio=native,detect-zeroes=unmap' \
+  -device 'scsi-hd,bus=scsihw0.0,channel=0,scsi-id=0,lun=0,drive=drive-scsi0,id=scsi0,bootindex=100' \
+  -machine 'type=pc+pve0'
-- 
2.30.2




^ permalink raw reply	[flat|nested] 7+ messages in thread

* [pve-devel] [PATCH qemu-server 2/6] virtio-blk: add queues option
  2023-03-09  8:52 [pve-devel] [PATCH qemu-server 0/6] improve virtio drive multiqueues Alexandre Derumier
  2023-03-09  8:52 ` [pve-devel] [PATCH qemu-server 1/6] add virtio-scsi && virtio-scsi-single tests Alexandre Derumier
@ 2023-03-09  8:52 ` Alexandre Derumier
  2023-03-09  8:52 ` [pve-devel] [PATCH qemu-server 3/6] cpuconfig: add get_cpu_topology helper Alexandre Derumier
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Alexandre Derumier @ 2023-03-09  8:52 UTC (permalink / raw)
  To: pve-devel

We already added support for virtio-scsi some years ago,
but forget to add it for virtio-blk

Note that qemu attribute in "num-queues" for virtio-blk,

instaed "num_queues"  for virtio-scsi

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
---
 PVE/QemuServer.pm       | 1 +
 PVE/QemuServer/Drive.pm | 1 +
 2 files changed, 2 insertions(+)

diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
index 40be44d..deb7faf 100644
--- a/PVE/QemuServer.pm
+++ b/PVE/QemuServer.pm
@@ -1505,6 +1505,7 @@ sub print_drivedevice_full {
 	my $pciaddr = print_pci_addr("$drive_id", $bridges, $arch, $machine_type);
 	$device = "virtio-blk-pci,drive=drive-$drive_id,id=${drive_id}${pciaddr}";
 	$device .= ",iothread=iothread-$drive_id" if $drive->{iothread};
+	$device .= ",num-queues=$drive->{queues}" if $drive->{queues};
     } elsif ($drive->{interface} eq 'scsi') {
 
 	my ($maxdev, $controller, $controller_prefix) = scsihw_infos($conf, $drive);
diff --git a/PVE/QemuServer/Drive.pm b/PVE/QemuServer/Drive.pm
index b0e0a96..cd2823a 100644
--- a/PVE/QemuServer/Drive.pm
+++ b/PVE/QemuServer/Drive.pm
@@ -304,6 +304,7 @@ PVE::JSONSchema::register_standard_option("pve-qm-sata", $satadesc);
 my $virtio_fmt = {
     %drivedesc_base,
     %iothread_fmt,
+    %queues_fmt,
     %readonly_fmt,
 };
 my $virtiodesc = {
-- 
2.30.2




^ permalink raw reply	[flat|nested] 7+ messages in thread

* [pve-devel] [PATCH qemu-server 3/6] cpuconfig: add get_cpu_topology helper
  2023-03-09  8:52 [pve-devel] [PATCH qemu-server 0/6] improve virtio drive multiqueues Alexandre Derumier
  2023-03-09  8:52 ` [pve-devel] [PATCH qemu-server 1/6] add virtio-scsi && virtio-scsi-single tests Alexandre Derumier
  2023-03-09  8:52 ` [pve-devel] [PATCH qemu-server 2/6] virtio-blk: add queues option Alexandre Derumier
@ 2023-03-09  8:52 ` Alexandre Derumier
  2023-03-09  8:52 ` [pve-devel] [PATCH qemu-server 4/6] fix #4295 : virtio-(blk|scsi): enable multiqueue by default Alexandre Derumier
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Alexandre Derumier @ 2023-03-09  8:52 UTC (permalink / raw)
  To: pve-devel

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
---
 PVE/QemuServer.pm           | 16 +++-------------
 PVE/QemuServer/CPUConfig.pm | 11 +++++++++++
 2 files changed, 14 insertions(+), 13 deletions(-)

diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
index deb7faf..b49b59b 100644
--- a/PVE/QemuServer.pm
+++ b/PVE/QemuServer.pm
@@ -50,7 +50,7 @@ use PVE::QemuConfig;
 use PVE::QemuServer::Helpers qw(min_version config_aware_timeout windows_version);
 use PVE::QemuServer::Cloudinit;
 use PVE::QemuServer::CGroup;
-use PVE::QemuServer::CPUConfig qw(print_cpu_device get_cpu_options);
+use PVE::QemuServer::CPUConfig qw(print_cpu_device get_cpu_options get_cpu_topology);
 use PVE::QemuServer::Drive qw(is_valid_drivename drive_is_cloudinit drive_is_cdrom drive_is_read_only parse_drive print_drive);
 use PVE::QemuServer::Machine;
 use PVE::QemuServer::Memory;
@@ -3818,13 +3818,7 @@ sub config_to_command {
 
     add_tpm_device($vmid, $devices, $conf);
 
-    my $sockets = 1;
-    $sockets = $conf->{smp} if $conf->{smp}; # old style - no longer iused
-    $sockets = $conf->{sockets} if  $conf->{sockets};
-
-    my $cores = $conf->{cores} || 1;
-
-    my $maxcpus = $sockets * $cores;
+    my ($sockets, $cores, $maxcpus) = get_cpu_topology($conf);
 
     my $vcpus = $conf->{vcpus} ? $conf->{vcpus} : $maxcpus;
 
@@ -4660,11 +4654,7 @@ sub qemu_cpu_hotplug {
 
     my $machine_type = PVE::QemuServer::Machine::get_current_qemu_machine($vmid);
 
-    my $sockets = 1;
-    $sockets = $conf->{smp} if $conf->{smp}; # old style - no longer iused
-    $sockets = $conf->{sockets} if  $conf->{sockets};
-    my $cores = $conf->{cores} || 1;
-    my $maxcpus = $sockets * $cores;
+    my ($sockets, $cores, $maxcpus) = get_cpu_topology($conf);
 
     $vcpus = $maxcpus if !$vcpus;
 
diff --git a/PVE/QemuServer/CPUConfig.pm b/PVE/QemuServer/CPUConfig.pm
index fb0861b..826e472 100644
--- a/PVE/QemuServer/CPUConfig.pm
+++ b/PVE/QemuServer/CPUConfig.pm
@@ -12,6 +12,7 @@ use base qw(PVE::SectionConfig Exporter);
 our @EXPORT_OK = qw(
 print_cpu_device
 get_cpu_options
+get_cpu_topology
 );
 
 # under certain race-conditions, this module might be loaded before pve-cluster
@@ -659,6 +660,16 @@ sub get_cpu_from_running_vm {
     return $1;
 }
 
+sub get_cpu_topology {
+    my ($conf) = @_;
+
+    my $sockets = $conf->{sockets} || 1;
+    my $cores = $conf->{cores} || 1;
+    my $maxcpus = $sockets * $cores;
+
+    return ($sockets, $cores, $maxcpus);
+}
+
 __PACKAGE__->register();
 __PACKAGE__->init();
 
-- 
2.30.2




^ permalink raw reply	[flat|nested] 7+ messages in thread

* [pve-devel] [PATCH qemu-server 4/6] fix #4295 : virtio-(blk|scsi): enable multiqueue by default
  2023-03-09  8:52 [pve-devel] [PATCH qemu-server 0/6] improve virtio drive multiqueues Alexandre Derumier
                   ` (2 preceding siblings ...)
  2023-03-09  8:52 ` [pve-devel] [PATCH qemu-server 3/6] cpuconfig: add get_cpu_topology helper Alexandre Derumier
@ 2023-03-09  8:52 ` Alexandre Derumier
  2023-03-09  8:52 ` [pve-devel] [PATCH qemu-server 5/6] drive: allow minimum queues = 1 Alexandre Derumier
  2023-03-09  8:52 ` [pve-devel] [PATCH qemu-server 6/6] add virtio-blk|scsi default multiqueue tests Alexandre Derumier
  5 siblings, 0 replies; 7+ messages in thread
From: Alexandre Derumier @ 2023-03-09  8:52 UTC (permalink / raw)
  To: pve-devel

set num_queues = maxcpus for qemu 8.0

redhat already done it in rhev since 2021
https://bugzilla.redhat.com/show_bug.cgi?id=1827722#c11

The -device virtio-blk,num-queues= and -device virtio-scsi,num_queues= parameters control how many virtqueues are available to the guest. Allocating one virtqueue per vCPU improves performance as follows:
Interrupts are handled on the vCPU that submitted the request, avoiding IPIs
The I/O scheduler is automatically set to “none” by the Linux block layer

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
---
 PVE/QemuServer.pm | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
index b49b59b..39d30e3 100644
--- a/PVE/QemuServer.pm
+++ b/PVE/QemuServer.pm
@@ -1505,7 +1505,14 @@ sub print_drivedevice_full {
 	my $pciaddr = print_pci_addr("$drive_id", $bridges, $arch, $machine_type);
 	$device = "virtio-blk-pci,drive=drive-$drive_id,id=${drive_id}${pciaddr}";
 	$device .= ",iothread=iothread-$drive_id" if $drive->{iothread};
+
+	my $machine_version = extract_version($machine_type, kvm_user_version());
+	if (min_version($machine_version, 8, 0)) {
+	    my ($sockets, $cores, $maxcpus) = get_cpu_topology($conf);
+	    $drive->{queues} = $maxcpus if !$drive->{queues};
+	}
 	$device .= ",num-queues=$drive->{queues}" if $drive->{queues};
+
     } elsif ($drive->{interface} eq 'scsi') {
 
 	my ($maxdev, $controller, $controller_prefix) = scsihw_infos($conf, $drive);
@@ -4043,6 +4050,12 @@ sub config_to_command {
 		);
 	    }
 
+	    if (min_version($machine_version, 8, 0)) {
+		my ($sockets, $cores, $maxcpus) = get_cpu_topology($conf);
+		$drive->{queues} = $maxcpus if !$drive->{queues};
+
+	    }
+
 	    my $queues = '';
 	    if($conf->{scsihw} && $conf->{scsihw} eq "virtio-scsi-single" && $drive->{queues}){
 		$queues = ",num_queues=$drive->{queues}";
@@ -4306,6 +4319,12 @@ sub vm_deviceplug {
 	    $devicefull .= ",iothread=iothread-$deviceid";
 	}
 
+	my $machine_version = PVE::QemuServer::Machine::extract_version($machine_type);
+	if (min_version($machine_version, 8, 0)) {
+	    my ($sockets, $cores, $maxcpus) = get_cpu_topology($conf);
+	    $device->{queues} = $maxcpus if !$device->{queues};
+	}
+
 	if($deviceid =~ m/^virtioscsi(\d+)$/ && $device->{queues}) {
 	    $devicefull .= ",num_queues=$device->{queues}";
 	}
-- 
2.30.2




^ permalink raw reply	[flat|nested] 7+ messages in thread

* [pve-devel] [PATCH qemu-server 5/6] drive: allow minimum queues = 1
  2023-03-09  8:52 [pve-devel] [PATCH qemu-server 0/6] improve virtio drive multiqueues Alexandre Derumier
                   ` (3 preceding siblings ...)
  2023-03-09  8:52 ` [pve-devel] [PATCH qemu-server 4/6] fix #4295 : virtio-(blk|scsi): enable multiqueue by default Alexandre Derumier
@ 2023-03-09  8:52 ` Alexandre Derumier
  2023-03-09  8:52 ` [pve-devel] [PATCH qemu-server 6/6] add virtio-blk|scsi default multiqueue tests Alexandre Derumier
  5 siblings, 0 replies; 7+ messages in thread
From: Alexandre Derumier @ 2023-03-09  8:52 UTC (permalink / raw)
  To: pve-devel

If user want to disable new default multiqueue

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
---
 PVE/QemuServer/Drive.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/PVE/QemuServer/Drive.pm b/PVE/QemuServer/Drive.pm
index cd2823a..546977d 100644
--- a/PVE/QemuServer/Drive.pm
+++ b/PVE/QemuServer/Drive.pm
@@ -174,7 +174,7 @@ my %queues_fmt = (
     queues => {
 	type => 'integer',
 	description => "Number of queues.",
-	minimum => 2,
+	minimum => 1,
 	optional => 1
     }
 );
-- 
2.30.2




^ permalink raw reply	[flat|nested] 7+ messages in thread

* [pve-devel] [PATCH qemu-server 6/6] add virtio-blk|scsi default multiqueue tests
  2023-03-09  8:52 [pve-devel] [PATCH qemu-server 0/6] improve virtio drive multiqueues Alexandre Derumier
                   ` (4 preceding siblings ...)
  2023-03-09  8:52 ` [pve-devel] [PATCH qemu-server 5/6] drive: allow minimum queues = 1 Alexandre Derumier
@ 2023-03-09  8:52 ` Alexandre Derumier
  5 siblings, 0 replies; 7+ messages in thread
From: Alexandre Derumier @ 2023-03-09  8:52 UTC (permalink / raw)
  To: pve-devel

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
---
 test/cfg2cmd/simple-virtio-blk-8.0.conf       | 13 ++++++++
 test/cfg2cmd/simple-virtio-blk-8.0.conf.cmd   | 31 +++++++++++++++++
 .../simple-virtio-scsi-single-8.0.conf        | 14 ++++++++
 .../simple-virtio-scsi-single-8.0.conf.cmd    | 33 +++++++++++++++++++
 4 files changed, 91 insertions(+)
 create mode 100644 test/cfg2cmd/simple-virtio-blk-8.0.conf
 create mode 100644 test/cfg2cmd/simple-virtio-blk-8.0.conf.cmd
 create mode 100644 test/cfg2cmd/simple-virtio-scsi-single-8.0.conf
 create mode 100644 test/cfg2cmd/simple-virtio-scsi-single-8.0.conf.cmd

diff --git a/test/cfg2cmd/simple-virtio-blk-8.0.conf b/test/cfg2cmd/simple-virtio-blk-8.0.conf
new file mode 100644
index 0000000..7f7ad57
--- /dev/null
+++ b/test/cfg2cmd/simple-virtio-blk-8.0.conf
@@ -0,0 +1,13 @@
+# TEST: Test for a basic configuration with a VirtIO Block IOThread disk
+# QEMU_VERSION: 8.0
+bootdisk: virtio0
+cores: 3
+ide2: none,media=cdrom
+memory: 768
+name: simple
+numa: 0
+ostype: l26
+smbios1: uuid=7b10d7af-b932-4c66-b2c3-3996152ec465
+sockets: 1
+virtio0: local:8006/vm-8006-disk-0.qcow2,discard=on,iothread=1,size=104858K
+vmgenid: c773c261-d800-4348-9f5d-167fadd53cf8
diff --git a/test/cfg2cmd/simple-virtio-blk-8.0.conf.cmd b/test/cfg2cmd/simple-virtio-blk-8.0.conf.cmd
new file mode 100644
index 0000000..0a89928
--- /dev/null
+++ b/test/cfg2cmd/simple-virtio-blk-8.0.conf.cmd
@@ -0,0 +1,31 @@
+/usr/bin/kvm \
+  -id 8006 \
+  -name 'simple,debug-threads=on' \
+  -no-shutdown \
+  -chardev 'socket,id=qmp,path=/var/run/qemu-server/8006.qmp,server=on,wait=off' \
+  -mon 'chardev=qmp,mode=control' \
+  -chardev 'socket,id=qmp-event,path=/var/run/qmeventd.sock,reconnect=5' \
+  -mon 'chardev=qmp-event,mode=control' \
+  -pidfile /var/run/qemu-server/8006.pid \
+  -daemonize \
+  -smbios 'type=1,uuid=7b10d7af-b932-4c66-b2c3-3996152ec465' \
+  -smp '3,sockets=1,cores=3,maxcpus=3' \
+  -nodefaults \
+  -boot 'menu=on,strict=on,reboot-timeout=1000,splash=/usr/share/qemu-server/bootsplash.jpg' \
+  -vnc 'unix:/var/run/qemu-server/8006.vnc,password=on' \
+  -cpu kvm64,enforce,+kvm_pv_eoi,+kvm_pv_unhalt,+lahf_lm,+sep \
+  -m 768 \
+  -object 'iothread,id=iothread-virtio0' \
+  -device 'pci-bridge,id=pci.1,chassis_nr=1,bus=pci.0,addr=0x1e' \
+  -device 'pci-bridge,id=pci.2,chassis_nr=2,bus=pci.0,addr=0x1f' \
+  -device 'vmgenid,guid=c773c261-d800-4348-9f5d-167fadd53cf8' \
+  -device 'piix3-usb-uhci,id=uhci,bus=pci.0,addr=0x1.0x2' \
+  -device 'usb-tablet,id=tablet,bus=uhci.0,port=1' \
+  -device 'VGA,id=vga,bus=pci.0,addr=0x2' \
+  -device 'virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3,free-page-reporting=on' \
+  -iscsi 'initiator-name=iqn.1993-08.org.debian:01:aabbccddeeff' \
+  -drive 'if=none,id=drive-ide2,media=cdrom,aio=io_uring' \
+  -device 'ide-cd,bus=ide.1,unit=0,drive=drive-ide2,id=ide2,bootindex=200' \
+  -drive 'file=/var/lib/vz/images/8006/vm-8006-disk-0.qcow2,if=none,id=drive-virtio0,discard=on,format=qcow2,cache=none,aio=io_uring,detect-zeroes=unmap' \
+  -device 'virtio-blk-pci,drive=drive-virtio0,id=virtio0,bus=pci.0,addr=0xa,iothread=iothread-virtio0,num-queues=3,bootindex=100' \
+  -machine 'type=pc+pve0'
diff --git a/test/cfg2cmd/simple-virtio-scsi-single-8.0.conf b/test/cfg2cmd/simple-virtio-scsi-single-8.0.conf
new file mode 100644
index 0000000..b836b8a
--- /dev/null
+++ b/test/cfg2cmd/simple-virtio-scsi-single-8.0.conf
@@ -0,0 +1,14 @@
+# TEST: Test for a basic configuration with a virtio-scsi-single IOThread disk
+# QEMU_VERSION: 8.0
+bootdisk: scsi0
+cores: 3
+ide2: none,media=cdrom
+memory: 768
+name: simple
+numa: 0
+ostype: l26
+smbios1: uuid=7b10d7af-b932-4c66-b2c3-3996152ec465
+sockets: 1
+scsihw: virtio-scsi-single
+scsi0: local:8006/vm-8006-disk-0.qcow2,discard=on,iothread=1,size=104858K
+vmgenid: c773c261-d800-4348-9f5d-167fadd53cf8
diff --git a/test/cfg2cmd/simple-virtio-scsi-single-8.0.conf.cmd b/test/cfg2cmd/simple-virtio-scsi-single-8.0.conf.cmd
new file mode 100644
index 0000000..364f4be
--- /dev/null
+++ b/test/cfg2cmd/simple-virtio-scsi-single-8.0.conf.cmd
@@ -0,0 +1,33 @@
+/usr/bin/kvm \
+  -id 8006 \
+  -name 'simple,debug-threads=on' \
+  -no-shutdown \
+  -chardev 'socket,id=qmp,path=/var/run/qemu-server/8006.qmp,server=on,wait=off' \
+  -mon 'chardev=qmp,mode=control' \
+  -chardev 'socket,id=qmp-event,path=/var/run/qmeventd.sock,reconnect=5' \
+  -mon 'chardev=qmp-event,mode=control' \
+  -pidfile /var/run/qemu-server/8006.pid \
+  -daemonize \
+  -smbios 'type=1,uuid=7b10d7af-b932-4c66-b2c3-3996152ec465' \
+  -smp '3,sockets=1,cores=3,maxcpus=3' \
+  -nodefaults \
+  -boot 'menu=on,strict=on,reboot-timeout=1000,splash=/usr/share/qemu-server/bootsplash.jpg' \
+  -vnc 'unix:/var/run/qemu-server/8006.vnc,password=on' \
+  -cpu kvm64,enforce,+kvm_pv_eoi,+kvm_pv_unhalt,+lahf_lm,+sep \
+  -m 768 \
+  -object 'iothread,id=iothread-virtioscsi0' \
+  -device 'pci-bridge,id=pci.1,chassis_nr=1,bus=pci.0,addr=0x1e' \
+  -device 'pci-bridge,id=pci.2,chassis_nr=2,bus=pci.0,addr=0x1f' \
+  -device 'pci-bridge,id=pci.3,chassis_nr=3,bus=pci.0,addr=0x5' \
+  -device 'vmgenid,guid=c773c261-d800-4348-9f5d-167fadd53cf8' \
+  -device 'piix3-usb-uhci,id=uhci,bus=pci.0,addr=0x1.0x2' \
+  -device 'usb-tablet,id=tablet,bus=uhci.0,port=1' \
+  -device 'VGA,id=vga,bus=pci.0,addr=0x2' \
+  -device 'virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3,free-page-reporting=on' \
+  -iscsi 'initiator-name=iqn.1993-08.org.debian:01:aabbccddeeff' \
+  -drive 'if=none,id=drive-ide2,media=cdrom,aio=io_uring' \
+  -device 'ide-cd,bus=ide.1,unit=0,drive=drive-ide2,id=ide2,bootindex=200' \
+  -device 'virtio-scsi-pci,id=virtioscsi0,bus=pci.3,addr=0x1,iothread=iothread-virtioscsi0,num_queues=3' \
+  -drive 'file=/var/lib/vz/images/8006/vm-8006-disk-0.qcow2,if=none,id=drive-scsi0,discard=on,format=qcow2,cache=none,aio=io_uring,detect-zeroes=unmap' \
+  -device 'scsi-hd,bus=virtioscsi0.0,channel=0,scsi-id=0,lun=0,drive=drive-scsi0,id=scsi0,bootindex=100' \
+  -machine 'type=pc+pve0'
-- 
2.30.2




^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2023-03-09  8:52 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-09  8:52 [pve-devel] [PATCH qemu-server 0/6] improve virtio drive multiqueues Alexandre Derumier
2023-03-09  8:52 ` [pve-devel] [PATCH qemu-server 1/6] add virtio-scsi && virtio-scsi-single tests Alexandre Derumier
2023-03-09  8:52 ` [pve-devel] [PATCH qemu-server 2/6] virtio-blk: add queues option Alexandre Derumier
2023-03-09  8:52 ` [pve-devel] [PATCH qemu-server 3/6] cpuconfig: add get_cpu_topology helper Alexandre Derumier
2023-03-09  8:52 ` [pve-devel] [PATCH qemu-server 4/6] fix #4295 : virtio-(blk|scsi): enable multiqueue by default Alexandre Derumier
2023-03-09  8:52 ` [pve-devel] [PATCH qemu-server 5/6] drive: allow minimum queues = 1 Alexandre Derumier
2023-03-09  8:52 ` [pve-devel] [PATCH qemu-server 6/6] add virtio-blk|scsi default multiqueue tests Alexandre Derumier

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