Difference between virtio and virtio single controller types?

WvdW

Member
Apr 18, 2013
24
1
23
Hi,

I can't seem to find any documentation detailing the difference between the virtio and the virtio single scsi controller types for KVM VMs. Has anybody got a link or can perhaps briefly explain when you would use the one or the other?

Thanks.

Werner
 

sdinet

Member
Feb 24, 2016
69
0
6
USA
VIRTio is synthetic adapter, much faster than software designed to behave like hardware.
 

manu

Proxmox Staff Member
Mar 3, 2015
806
66
28
More exactly virtio-scsi appears to the emulated guest as a standard scsci controller, so every SCSI command ( think:discard ) works there to.
Disk will appear like normal disks under a Linux guest /dev/sda,b,c

virtio controller is a special controller of its own kind and disks will appear as /dev/vda,b,c

Both of them should give you similar performances.
 

BloodyIron

Active Member
Jan 14, 2013
211
5
38
it.lanified.com
I want to point out that neither of these responses actually talks about the difference between:

  1. "VirtIO SCSI" and
  2. "VirtIO SCSI single"

I can't find any documentation myself just yet either, so knowing what exactly the differences are would be important to us admins. Can we get these things documented somewhere please?
 

dietmar

Proxmox Staff Member
Staff member
Apr 28, 2005
17,002
467
103
Austria
www.proxmox.com
The 'single' variant can starts an extra IO thread per disk, so this can sometimes give better performance.
 
Last edited:

spirit

Famous Member
Apr 2, 2010
5,147
483
103
www.odiso.com
virtio-scsi-single is required to enable iothread. (and multiqueues in the future).

with virtio-scsi-single, you have 1 virtio-scsi controller by scsi disk.
virtio-scsi classic, you have all scsi disk on same virtio-scsi controller.
 

gkovacs

Well-Known Member
Dec 22, 2008
507
48
48
Budapest, Hungary
The 'single' variant can starts an extra IO thread per disk, so this can sometimes give better performance.
virtio-scsi-single is required to enable iothread. (and multiqueues in the future).

with virtio-scsi-single, you have 1 virtio-scsi controller by scsi disk.
virtio-scsi classic, you have all scsi disk on same virtio-scsi controller.

So I need to select VirtIO SCSI single in Options, and also enable IO Thread for every disk in Hardware to ensure iothread is working?

Is there any other limitation (cache type, etc.) for iothread? Right now my VM is on zfs-local, with cache=writeback.

Is there any reliable way to verify that iothread is working?
 

mir

Famous Member
Apr 14, 2012
3,553
113
83
Copenhagen, Denmark
So I need to select VirtIO SCSI single in Options, and also enable IO Thread for every disk in Hardware to ensure iothread is working?

Is there any other limitation (cache type, etc.) for iothread? Right now my VM is on zfs-local, with cache=writeback.

Is there any reliable way to verify that iothread is working?
A bug currently breaks life snapshots when iothread is enabled.
 

spirit

Famous Member
Apr 2, 2010
5,147
483
103
www.odiso.com
So I need to select VirtIO SCSI single in Options, and also enable IO Thread for every disk in Hardware to ensure iothread is working?

Is there any other limitation (cache type, etc.) for iothread? Right now my VM is on zfs-local, with cache=writeback.

Is there any reliable way to verify that iothread is working?

your don't need to enable iothread on all disk. each disk can have his own iothread.
if you don't check iothread, the disk use the main qemu thread.
 

spirit

Famous Member
Apr 2, 2010
5,147
483
103
www.odiso.com
No, it means you will not be able to rollback a life snapshot (starting old snapshot crashes qemu)

Hi mir, I'm not aware of this bug.
The rollback is done on storage when vm is shutdown, so iothread should not impact it.
They was a bug for taking snapshot some week ago, but it should be fixed now.
 

mir

Famous Member
Apr 14, 2012
3,553
113
83
Copenhagen, Denmark
Hi mir, I'm not aware of this bug.
The rollback is done on storage when vm is shutdown, so iothread should not impact it.
They was a bug for taking snapshot some week ago, but it should be fixed now.
The bug was due to memory corruption so when rolling back qemu crashed. You say it is fixed, but is this fix in enterprise repo?
 

manu

Proxmox Staff Member
Mar 3, 2015
806
66
28
@BloodyIron: did you open an account on the wiki ?
 

manu

Proxmox Staff Member
Mar 3, 2015
806
66
28
@BloodyIron: yes

sent a short email referecing this thread to office at proxmox com and ask for an account
wiki is currently invite only due to spam abuse
 

fabian

Proxmox Staff Member
Staff member
Jan 7, 2016
6,224
1,061
164
@dietmar @fabian is this true?
what is supposed to happen, does the backup stop with an error?

the VM configuration is checked at the beginning of the backup and an error message is returned if iothreads are enabled on any of the disks that should be included in the backup.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get your own in 60 seconds.

Buy now!