qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] SSD Trim Support- Current State?
@ 2013-03-17 20:58 d hee
  2013-03-18  8:36 ` Paolo Bonzini
  2013-03-18  8:49 ` [Qemu-devel] " Nicolas Sebrecht
  0 siblings, 2 replies; 3+ messages in thread
From: d hee @ 2013-03-17 20:58 UTC (permalink / raw)
  To: qemu-devel@nongnu.org

[-- Attachment #1: Type: text/plain, Size: 584 bytes --]

What is the current state of SSD Trim/Discard support  for a Qemu/KVM guests? 

I run a Qemi/ KVM host wtih these kvm guests...they are all Linux os's and use raw images: 1) 20 gig Linux web-server 2) Subsonic music streaming server for my Android phone 3) Postfix server for automated emails 4) Linux guest for sandbox for testing. All of this is on my on personal system as a hobby and not a a business "production" system. If I run them off a ssd drive without the trim support, will I see performance impacted as the guest blocks slowly fill up without being marked for reuse?

[-- Attachment #2: Type: text/html, Size: 994 bytes --]

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

* Re: [Qemu-devel] SSD Trim Support- Current State?
  2013-03-17 20:58 [Qemu-devel] SSD Trim Support- Current State? d hee
@ 2013-03-18  8:36 ` Paolo Bonzini
  2013-03-18  8:49 ` [Qemu-devel] " Nicolas Sebrecht
  1 sibling, 0 replies; 3+ messages in thread
From: Paolo Bonzini @ 2013-03-18  8:36 UTC (permalink / raw)
  To: d hee; +Cc: qemu-devel@nongnu.org

Il 17/03/2013 21:58, d hee ha scritto:
> What is the current state of SSD Trim/Discard support  for a Qemu/KVM
> guests? 
> 
> I run a Qemi/ KVM host wtih these kvm guests...they are all Linux os's
> and use raw images: 1) 20 gig Linux web-server 2) Subsonic music
> streaming server for my Android phone 3) Postfix server for automated
> emails 4) Linux guest for sandbox for testing. All of this is on my on
> personal system as a hobby and not a a business "production" system. If
> I run them off a ssd drive without the trim support, will I see
> performance impacted as the guest blocks slowly fill up without being
> marked for reuse?

DISCARD is finally supported in qemu.git.  It is experimental in all
released versions.  To get trim support you need to do all of the following:

2) use virtio-scsi or another SCSI HBA (IDE would work too, but it is slow);

2) compile qemu.git from master and add ",discard=on" to the "-drive"
option; or for released versions add ",discard_granularity=4096" to the
"-device" options for disks.  For more informations on "-drive" and
"-device" check out the docs/qdev-device-use.txt file.

3) mount the filesystems with the discard option in the guest, or
periodically run fstrim in the guest;

4) either run the images directly from a partition or logical volume, or
mount the filesystems with the discard option in the host, or
periodically run fstrim in the host.

Paolo

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

* [Qemu-devel]  Re: SSD Trim Support- Current State?
  2013-03-17 20:58 [Qemu-devel] SSD Trim Support- Current State? d hee
  2013-03-18  8:36 ` Paolo Bonzini
@ 2013-03-18  8:49 ` Nicolas Sebrecht
  1 sibling, 0 replies; 3+ messages in thread
From: Nicolas Sebrecht @ 2013-03-18  8:49 UTC (permalink / raw)
  To: d hee; +Cc: qemu-devel@nongnu.org, Nicolas Sebrecht

The 17/03/13, d hee wrote:

> What is the current state of SSD Trim/Discard support  for a Qemu/KVM guests? 
> 
> I run a Qemi/ KVM host wtih these kvm guests...they are all Linux os's and use raw images: 1) 20 gig Linux web-server 2) Subsonic music streaming server for my Android phone 3) Postfix server for automated emails 4) Linux guest for sandbox for testing. All of this is on my on personal system as a hobby and not a a business "production" system. If I run them off a ssd drive without the trim support, will I see performance impacted as the guest blocks slowly fill up without being marked for reuse?

Depends of the SSD you have and the use you make of it. For recent
enough SSD, TRIM support is no more required as firmwares better manage
blocks and pages than in the first days of SSD.

Unless you use your SSD for big rewrites every day, I bet you won't have
to enable TRIM.

Also, If you still want TRIM enabled I think there is no need for
QEMU/KVM to support TRIM as you use RAW format. This is the job of your
guests.

What would make high preformance degradation is not having blocks
aligned.

-- 
Nicolas Sebrecht

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

end of thread, other threads:[~2013-03-18  8:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-17 20:58 [Qemu-devel] SSD Trim Support- Current State? d hee
2013-03-18  8:36 ` Paolo Bonzini
2013-03-18  8:49 ` [Qemu-devel] " Nicolas Sebrecht

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).