On 09/30/2014 05:21 PM, Brian Rak wrote:
Are there any plans to bring trim support to Virtio-blk? We've got a
couple things that would be made nicer by having working trim support.
I see that it's implemented in virtio-scsi, but there's a decent
performance hit for switching over to that.
i haven't been following the discussions on the qemu-devel mailing
list in a while but i would be surprised if anyone is planning on
adding discard to virtio-blk. part of the reason that virtio-scsi was
created was that virtio-blk is hard to extend with new features.
if virtio-scsi is not an option for you, then maybe you could consider
using ahci. there probably is going to be some amount of a performance
hit but using ahci but maybe its small enough that its not a problem
for you. there was not an easy way to use an virtual ahci disk
controller using just the -drive option last time i checked. something
like the following would do it.
-drive file=/path/to/virtual/disk.qcow,if=none,id=disk0 -device
ahci,id=ahci0 -device ide-drive,id=ahci0-disk0,bus=ahci0.0,drive=disk0
this creates the virtual disk with an id of disk0, creates the virtual
ahci controller with an id of ahci0, and then creates an connection of
the virtual disk to the ahci controller on port 0 (the .0 part on the
bus option). i know its also possible specify an virtual ahci
controller when using libvirt but i don't know off the top of my head
how to do that.
i am curious what kind of performance hits you have seen when
switching from virtio-blk to virtio-scsi. i was under the impression
there wasn't much if any performance difference.
mike