[pve-devel] [PATCH v3 manager 1/2] HDEdit: check iothread by default and move it from advanced section

Matthias Heiserer m.heiserer at proxmox.com
Thu May 12 11:24:13 CEST 2022


Existing disks are not changed by this.
Especially in benchmarks, iothreads significantly improve IO performance.


Signed-off-by: Matthias Heiserer <m.heiserer at proxmox.com>
---

Changes from v2:
* also check iothread when adding a disk to an existing VM and 
 scsi single
* use bind instead of hardcoded true

 www/manager6/qemu/HDEdit.js | 27 ++++++++++++++++++---------
 1 file changed, 18 insertions(+), 9 deletions(-)

diff --git a/www/manager6/qemu/HDEdit.js b/www/manager6/qemu/HDEdit.js
index c643ee73..adee2591 100644
--- a/www/manager6/qemu/HDEdit.js
+++ b/www/manager6/qemu/HDEdit.js
@@ -14,6 +14,7 @@ Ext.define('PVE.qemu.HDInputPanel', {
 	data: {
 	    isScsi: false,
 	    isVirtIO: false,
+	    isSCSISingle: false,
 	},
     },
 
@@ -53,6 +54,12 @@ Ext.define('PVE.qemu.HDInputPanel', {
 		    this.lookupReference('scsiController').setValue(vmScsiType);
 		},
 	    },
+	    'field[name=scsiController]': {
+		change: function(f, value) {
+		    let vm = this.getViewModel();
+		    vm.set('isSCSISingle', value === 'virtio-scsi-single');
+		},
+	    },
 	},
 
 	init: function(view) {
@@ -195,6 +202,7 @@ Ext.define('PVE.qemu.HDInputPanel', {
 	    me.scsiController = Ext.create('Ext.form.field.Display', {
 		fieldLabel: gettext('SCSI Controller'),
 		reference: 'scsiController',
+		name: 'scsiController',
 		bind: me.insideWizard ? {
 		    value: '{current.scsihw}',
 		    visible: '{isSCSI}',
@@ -251,6 +259,16 @@ Ext.define('PVE.qemu.HDInputPanel', {
 		reference: 'discard',
 		name: 'discard',
 	    },
+	    {
+		xtype: 'proxmoxcheckbox',
+		name: 'iothread',
+		fieldLabel: 'IO thread',
+		clearOnDisable: true,
+		bind: {
+		    disabled: '{!isVirtIO && !isSCSI}',
+		    value: '{isSCSISingle}',
+		},
+	    },
 	);
 
 	advancedColumn1.push(
@@ -263,15 +281,6 @@ Ext.define('PVE.qemu.HDInputPanel', {
 		    disabled: '{isVirtIO}',
 		},
 	    },
-	    {
-		xtype: 'proxmoxcheckbox',
-		name: 'iothread',
-		fieldLabel: 'IO thread',
-		clearOnDisable: true,
-		bind: {
-		    disabled: '{!isVirtIO && !isSCSI}',
-		},
-	    },
 	    {
 		xtype: 'proxmoxcheckbox',
 		name: 'readOnly', // `ro` in the config, we map in get/set values
-- 
2.30.2






More information about the pve-devel mailing list