From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: Disk Emulation and Trim Instruction Date: Sun, 16 Aug 2009 14:43:04 +0300 Message-ID: <4A87F0C8.30506@redhat.com> References: <4A848F98.8010308@bobich.net> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org To: Gordan Bobic Return-path: Received: from mx2.redhat.com ([66.187.237.31]:45246 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751573AbZHPLrM (ORCPT ); Sun, 16 Aug 2009 07:47:12 -0400 In-Reply-To: <4A848F98.8010308@bobich.net> Sender: kvm-owner@vger.kernel.org List-ID: On 08/14/2009 01:11 AM, Gordan Bobic wrote: > With the recent talk of the trim SATA instruction becoming supported > in the upcoming versions of Windows and claims from Intel that support > for it in their SSDs is imminent, it occurs to me that this would be > equally useful in virtual disk emulation. > > Since the disk image is a sparse file, it always only grows, and > eventually it will grow to it's full intended size even if the actual > used space is a small fraction of the container size. Since the trim > instruction tells the disk that a particular block is no longer used > (and can thus be scheduled for erasing as and when required), the same > thing could be used to reclaim space used by sparse files backing the > VM. It would allow for higher overcommit of disk usage on VM farms. > > Is this feature likely to be available in KVM soon? We do want trim support for the reasons you mention as well as others. I don't know about anyone working to implement it though. -- error compiling committee.c: too many arguments to function