All of lore.kernel.org
 help / color / mirror / Atom feed
* Disk Emulation and Trim Instruction
@ 2009-08-13 22:11 Gordan Bobic
  2009-08-16 11:43 ` Avi Kivity
  0 siblings, 1 reply; 2+ messages in thread
From: Gordan Bobic @ 2009-08-13 22:11 UTC (permalink / raw)
  To: kvm

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?

Gordan

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Disk Emulation and Trim Instruction
  2009-08-13 22:11 Disk Emulation and Trim Instruction Gordan Bobic
@ 2009-08-16 11:43 ` Avi Kivity
  0 siblings, 0 replies; 2+ messages in thread
From: Avi Kivity @ 2009-08-16 11:43 UTC (permalink / raw)
  To: Gordan Bobic; +Cc: kvm

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-08-16 11:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-08-13 22:11 Disk Emulation and Trim Instruction Gordan Bobic
2009-08-16 11:43 ` Avi Kivity

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.