[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-discuss] Virtio-blk and trim

From: Brian Rak
Subject: Re: [Qemu-discuss] Virtio-blk and trim
Date: Fri, 03 Oct 2014 14:20:37 -0400
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0

So, I'm saying LVM on the host. If you have trim/discard enabled, when the guest trims a block, LVM marks that space as not used on the host.

It works like this:

* Take a guest running on a LVM LV (so, LVM on the host) with a 50GB disk. Assume 1GB in use
* Write 30 GB to that disk, and delete it
* With trim enabled, you'll end up with the LV using 1GB of space
* Without trim, the LV would still be using 31GB of space.

I think that if you enable the 'issue_discards' option for LVM, it'll even pass those commands down to the physical storage.

So, discard would be very, very useful for guests.

On 10/3/2014 1:38 PM, Tony Su wrote:
  So Brian, just clarifying...

You really are talking about LVM as configured in the Guest and not
LVM configured in the Host (and may or may not be exposed to the Guest
as raw, bare metal storage)?

If any commands which are executed on a virtual fs actually are passed
to the physical fs, that's something new to me.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]