* How-to for enabling TRIM for SSD RAID-1 arrays? @ 2013-09-13 20:25 Derek Piper 2013-09-13 20:36 ` Roberto Spadim 2013-09-13 22:54 ` Stan Hoeppner 0 siblings, 2 replies; 6+ messages in thread From: Derek Piper @ 2013-09-13 20:25 UTC (permalink / raw) To: linux-raid Hi, Having found a posting on this list from July this year, I am trying to find if (and how) TRIM support is supported and enabled under RAID 1 with 2 SSD drives. The posting was mentioned that it was included in the kernel source as of October 11th 2012. I see nothing on the RAID wiki for enabling TRIM for SSD backed arrays. Any pointers? I have a system with Debian 7 (Kernel 3.2, mdadm 3.2.5) that I am working on. Thanks in advance, Derek -- Derek Piper - derek.piper@gmail.com ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: How-to for enabling TRIM for SSD RAID-1 arrays? 2013-09-13 20:25 How-to for enabling TRIM for SSD RAID-1 arrays? Derek Piper @ 2013-09-13 20:36 ` Roberto Spadim 2013-09-13 20:48 ` Roberto Spadim 2013-09-13 22:54 ` Stan Hoeppner 1 sibling, 1 reply; 6+ messages in thread From: Roberto Spadim @ 2013-09-13 20:36 UTC (permalink / raw) To: Derek Piper; +Cc: Linux-RAID trim is enabled at mount option of filesystem (mount -t ext4 /dev/md0 /home -o discard) for ext4 it's discard option if i'm not wrong last kernels have trim support in software raid-1 (md raid1 driver), just mount the filesystem over it and use, i don't know the exact kernel version but it's ~1 year old feature 2013/9/13 Derek Piper <derek.piper@gmail.com>: > Hi, > > Having found a posting on this list from July this year, I am trying to > find if (and how) TRIM support is supported and enabled under RAID 1 with 2 > SSD drives. > > The posting was mentioned that it was included in the kernel source as of > October 11th 2012. > > I see nothing on the RAID wiki for enabling TRIM for SSD backed arrays. Any > pointers? > > I have a system with Debian 7 (Kernel 3.2, mdadm 3.2.5) that I am working > on. > > Thanks in advance, > > Derek > > -- > Derek Piper - derek.piper@gmail.com > -- > To unsubscribe from this list: send the line "unsubscribe linux-raid" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html -- Roberto Spadim ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: How-to for enabling TRIM for SSD RAID-1 arrays? 2013-09-13 20:36 ` Roberto Spadim @ 2013-09-13 20:48 ` Roberto Spadim 0 siblings, 0 replies; 6+ messages in thread From: Roberto Spadim @ 2013-09-13 20:48 UTC (permalink / raw) To: Derek Piper; +Cc: Linux-RAID from what i found about md raid1 support in google: http://lkml.indiana.edu/hypermail/linux/kernel/1203.1/01772.html [patch 4/7] md: raid 1 supports TRIM From: Shaohua Li Date: Sun Mar 11 2012 - 23:14:04 EST from ext4: https://ext4.wiki.kernel.org/index.php/Ext4_Howto#Ext4_code_implements_discard.2FTRIM https://sites.google.com/site/lightrush/random-1/howtoconfigureext4toenabletrimforssdsonubuntu http://forums.gentoo.org/viewtopic-p-6187612.html 2013/9/13 Roberto Spadim <rspadim@gmail.com>: > trim is enabled at mount option of filesystem (mount -t ext4 /dev/md0 > /home -o discard) > for ext4 it's discard option if i'm not wrong > last kernels have trim support in software raid-1 (md raid1 driver), > just mount the filesystem over it and use, i don't know the exact > kernel version but it's ~1 year old feature > > 2013/9/13 Derek Piper <derek.piper@gmail.com>: >> Hi, >> >> Having found a posting on this list from July this year, I am trying to >> find if (and how) TRIM support is supported and enabled under RAID 1 with 2 >> SSD drives. >> >> The posting was mentioned that it was included in the kernel source as of >> October 11th 2012. >> >> I see nothing on the RAID wiki for enabling TRIM for SSD backed arrays. Any >> pointers? >> >> I have a system with Debian 7 (Kernel 3.2, mdadm 3.2.5) that I am working >> on. >> >> Thanks in advance, >> >> Derek >> >> -- >> Derek Piper - derek.piper@gmail.com >> -- >> To unsubscribe from this list: send the line "unsubscribe linux-raid" in >> the body of a message to majordomo@vger.kernel.org >> More majordomo info at http://vger.kernel.org/majordomo-info.html > > > > -- > Roberto Spadim -- Roberto Spadim ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: How-to for enabling TRIM for SSD RAID-1 arrays? 2013-09-13 20:25 How-to for enabling TRIM for SSD RAID-1 arrays? Derek Piper 2013-09-13 20:36 ` Roberto Spadim @ 2013-09-13 22:54 ` Stan Hoeppner 2013-09-14 3:53 ` Derek Piper 1 sibling, 1 reply; 6+ messages in thread From: Stan Hoeppner @ 2013-09-13 22:54 UTC (permalink / raw) To: Derek Piper; +Cc: linux-raid On 9/13/2013 3:25 PM, Derek Piper wrote: > Having found a posting on this list from July this year, I am trying to > find if (and how) TRIM support is supported and enabled under RAID 1 with 2 > SSD drives. The are more important questions to first ask yourself. 1. Will TRIM benefit your make/model of SSDs? Are they the same brand, model, and firmware? If different brands or models, or even the same model w/different firmware, the two may behave completely differently WRT TRIM. One may speed up while the other slows down. 2. Will it benefit your workloads? 3. How compressible are your files, on average? 4. Which SSDs? SandForce 22xx based? Which firmware rev? See: http://www.anandtech.com/show/6107/corsair-force-series-gs-240gb-review 5. Do you plan to use realtime discard or batch discard? Most recent data shows that realtime discard murders performance. Summary: There is much, much, more to optimizing SSD performance than getting TRIM working down the stack. In fact some SSDs work better without TRIM, and some perform worse when TRIM is used. For many users, TRIM is a solution to a problem they may never have. They simply want it because they've read somewhere that they should have it. -- Stan ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: How-to for enabling TRIM for SSD RAID-1 arrays? 2013-09-13 22:54 ` Stan Hoeppner @ 2013-09-14 3:53 ` Derek Piper 2013-09-14 7:04 ` Mikael Abrahamsson 0 siblings, 1 reply; 6+ messages in thread From: Derek Piper @ 2013-09-14 3:53 UTC (permalink / raw) To: linux-raid I have 2 Sandisk Extreme 120GB SSDs (Sandforce 2281 with latest firmware - R211). I have indeed heard that TRIM was desirable to limit the effects of write amplification and to keep the write performance to a good level throughout the life of the drive(s). This machine is a home file/print/web/mysql server (the real large data being on regular 7200RPM HDD RAID arrays). The SSDs are for boot, root and home directories. A periodic 'garbage collection' type TRIM operation would be fine, and can be run at a cron job I see. It was not clear to me how the md-raid went about enabling that at the device level so fstrim would even work. In looking over the SanDisk Extreme with SandForce stuff relating to the firmware revision it appears that it is 5.03 or 5.04 in revision R211. It's possible that it might just not be worth it. I had a feeling that by enabling TRIM it would help my drives out. If that's not the case then it may best be left alone. Thanks, Derek On Fri, Sep 13, 2013 at 6:54 PM, Stan Hoeppner <stan@hardwarefreak.com> wrote: > On 9/13/2013 3:25 PM, Derek Piper wrote: > >> Having found a posting on this list from July this year, I am trying to >> find if (and how) TRIM support is supported and enabled under RAID 1 with 2 >> SSD drives. > > The are more important questions to first ask yourself. > > 1. Will TRIM benefit your make/model of SSDs? > Are they the same brand, model, and firmware? If different brands > or models, or even the same model w/different firmware, the two may > behave completely differently WRT TRIM. One may speed up while the > other slows down. > > 2. Will it benefit your workloads? > > 3. How compressible are your files, on average? > > 4. Which SSDs? SandForce 22xx based? Which firmware rev? See: > http://www.anandtech.com/show/6107/corsair-force-series-gs-240gb-review > > 5. Do you plan to use realtime discard or batch discard? Most recent > data shows that realtime discard murders performance. > > > Summary: There is much, much, more to optimizing SSD performance than > getting TRIM working down the stack. In fact some SSDs work better > without TRIM, and some perform worse when TRIM is used. > > For many users, TRIM is a solution to a problem they may never have. > They simply want it because they've read somewhere that they should have it. > > -- > Stan > > > -- Derek Piper - derek.piper@gmail.com ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: How-to for enabling TRIM for SSD RAID-1 arrays? 2013-09-14 3:53 ` Derek Piper @ 2013-09-14 7:04 ` Mikael Abrahamsson 0 siblings, 0 replies; 6+ messages in thread From: Mikael Abrahamsson @ 2013-09-14 7:04 UTC (permalink / raw) To: Derek Piper; +Cc: linux-raid On Fri, 13 Sep 2013, Derek Piper wrote: > I have 2 Sandisk Extreme 120GB SSDs (Sandforce 2281 with latest > firmware - R211). I have indeed heard that TRIM was desirable to limit > the effects of write amplification and to keep the write performance > to a good level throughout the life of the drive(s). This machine is a > home file/print/web/mysql server (the real large data being on regular > 7200RPM HDD RAID arrays). The SSDs are for boot, root and home > directories. You're most likely much better off by just using 80 gigs out of those 120 gig drives (don't use all space for partition) to avoid write amplification. TRIM has performance problems on some hardware (takes a long time per block), it's probably just better and easier to just keep blocks unused (never written to) and ignore TRIM. https://en.wikipedia.org/wiki/Write_amplification#Over-provisioning -- Mikael Abrahamsson email: swmike@swm.pp.se ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2013-09-14 7:04 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2013-09-13 20:25 How-to for enabling TRIM for SSD RAID-1 arrays? Derek Piper 2013-09-13 20:36 ` Roberto Spadim 2013-09-13 20:48 ` Roberto Spadim 2013-09-13 22:54 ` Stan Hoeppner 2013-09-14 3:53 ` Derek Piper 2013-09-14 7:04 ` Mikael Abrahamsson
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.