5c0919d020
Since Linux switched to blk-mq as the default in Linux commit 5c279bd9e406 ("scsi: default to scsi-mq"), virtio-scsi LUNs consume about 10x as much guest kernel memory. This commit allows you to choose the virtqueue size for each virtio-scsi-pci controller like this: -device virtio-scsi-pci,id=scsi,virtqueue_size=16 The default is still 128 as before. Using smaller virtqueue_size allows many more disks to be added to small memory virtual machines. For a 1 vCPU, 500 MB, no swap VM I observed: With scsi-mq enabled (upstream kernel): 175 disks -"- ditto -"- virtqueue_size=64: 318 disks -"- ditto -"- virtqueue_size=16: 775 disks With scsi-mq disabled (kernel before 5c279bd9e406): 1755 disks Note that to have any effect, this requires a kernel patch: https://lkml.org/lkml/2017/8/10/689 Signed-off-by: Richard W.M. Jones <rjones@redhat.com> Message-Id: <20170810165255.20865-1-rjones@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> |
||
---|---|---|
.. | ||
vhost-backend.h | ||
vhost-scsi-common.h | ||
vhost-scsi.h | ||
vhost-user-scsi.h | ||
vhost-vsock.h | ||
vhost.h | ||
virtio-access.h | ||
virtio-balloon.h | ||
virtio-blk.h | ||
virtio-bus.h | ||
virtio-crypto.h | ||
virtio-gpu.h | ||
virtio-input.h | ||
virtio-net.h | ||
virtio-rng.h | ||
virtio-scsi.h | ||
virtio-serial.h | ||
virtio.h |