[kwlug-disc] SSDs and TRIM

Lori Paniak ldpaniak at fourpisolutions.com
Thu Apr 29 18:18:18 EDT 2010

I don't think TRIM is really that important (ducks).  I am using an
Agility SSD from OCZ with the current (?) ver. 1.5 firmware with ubuntu
9.10 on my laptop.  The disk supports TRIM, but also has an internal
"idle Garbage Collection" routine. Empirical evidence suggests that the
drive performance has not degraded substantially in six months with only
the GC routine and no TRIM.

This reminds me to run bonnie:

> Version 1.03c       ------Sequential Output------ --Sequential Input- --Random-
>                     -Per Chr- --Block-- -Rewrite- -Per Chr- --Block-- --Seeks--
> Machine        Size K/sec %CP K/sec %CP K/sec %CP K/sec %CP K/sec %CP  /sec %CP
> callisto         8G 69357  94 128082  25 48556  16 63323  92 169623  28  2787  24
>                     ------Sequential Create------ --------Random Create--------
>                     -Create-- --Read--- -Delete-- -Create-- --Read--- -Delete--
>               files  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP
>                  16 +++++ +++ +++++ +++ +++++ +++ +++++ +++ +++++ +++ +++++ +++
> callisto,8G,69357,94,128082,25,48556,16,63323,92,169623,28,2786.5,24,16,+++++,+++,+++++,+++,+++++,+++,+++++,+++,+++++,+++,+++++,+++

I don't really speak bonnie output, but I think it says 170MB/sec reads
and 50-60MB/sec writes. Pretty much like new.  And I routinely fill the
drive and have to delete various isos and VM images.  What really kills
bonnie performance is running it on the encrypted home folder.

Having TRIM operating in conjunction with GC apparently does get you a
few more points of performance back after disk ops.  See for example:


I'd say get a disk with good idle GC and let each disk take care of
itself.  Don't bother worrying about the OS trying to operate TRIM
through LVM/RAID/USB/???

On Thu, 2010-04-29 at 12:10 -0400, Chris Irwin wrote:
> I just ordered my birthday present: A Solid-State Disk. I made sure I
> got one with TRIM support to try and prevent the performance
> degredation seen with earlier SSDs. Now, TRIM isn't part of ext4 until
> Linux 2.6.34, so I can't actually have live TRIM support at the
> filesystem layer, but it appears there is a manual utility that can be
> used with offline ext2/3/4 filesystems, and apparently online ext4 as
> well. (This is apparently part of hdparm now).
> BUT, has anybody been using TRIM on their LVM-backed filesystems? I've
> seen "No, can't be done", "Maybe it should work", and "yes, per the
> instructions in the forum". Of course the dozens of related forum
> threads have dozens of pages to sift through. I've put in a few hours
> of reading, but still have no idea what is going on. From what I
> understand, ext4's TRIM support won't work with LVM since the DM layer
> doesn't currently do the mapping. In theory, the third party TRIM
> utilities floating around could do it since they build their own maps
> and sector lists. Anybdoy else looked into this?
> The problem with LVM being that the filesystem isn't a flat map to a
> physical partition, and apparently nobody has done the work to build a
> map to redirect TRIM commands.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
URL: <http://kwlug.org/pipermail/kwlug-disc_kwlug.org/attachments/20100429/b88bb423/attachment.bin>

More information about the kwlug-disc mailing list