Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Does any know if there is a way to enable TRIM support on Linux for SSDs? This is included with Windows 7, and I was surprised that I couldn't find much information about it under Linux.

Info on SSD and TRIM can be found here - http://www.anandtech.com/storage/showdoc.aspx?i=3531&p=10

share|improve this question
2  
Linus himself is a big fan of SSD drives, so I'd suspect them to be well supported. torvalds-family.blogspot.com/2008/10/… –  Mark Ransom Aug 6 '09 at 21:16
add comment

6 Answers 6

up vote 13 down vote accepted

Notice that you probably need a more recent kernel than 2.6.28, see here (based on 2.6.30-rc4 with last activity in May this year). I do not know to what degree that tree has been merged, maybe you can search the linux-ide@vger.kernel.org mailing list. Update: see for instance this thread (also discussed on the kernel list).

For using TRIM you are probably interested in hdparm-9.20, released a few days ago (and I see there is even a newer wiper-1.7 release).

Update: See also this LWN article about the relationship between filesystem, TRIM, performance and SSD disks.

share|improve this answer
add comment

For ext4 you have to add the discard option in your fstab to enable ATA Trim.

See also this nice how-to

share|improve this answer
add comment

Initial support added in 2.6.28, 2.6.33 has "full" trim support... whatever that means.

share|improve this answer
add comment

Linux supported the TRIM command in 2.6.28, released on December 25, 2008. See here for details.

share|improve this answer
1  
Does this require file system support also? –  dlux Aug 6 '09 at 21:20
1  
[citation needed] –  Andrew Coleson Oct 26 '09 at 22:36
1  
citation added, thanks for keeping me honest. –  ChrisInEdmonton Oct 27 '09 at 0:55
add comment

I tracked TRIM command on UBUNTU 9.10. But I can't find any TRIM Command when I'm using the kernel 2.6.31. When I generated TRIM command using the hdparm, I can find TRIM command. So, I think current linux kernel version does not support TRIM command.

share|improve this answer
add comment

I think Linux already supports Trim. Its just no SSD has support for it yet. The firmware upgrade is required for current generation OCZ and Intel drives for Trim to be enabled.

share|improve this answer
1  
According to ocztechnology.com/products/flash_drives/… at least some OCZ products support TRIM. –  ChrisInEdmonton Aug 6 '09 at 20:47
    
Then you are mistaken. I am following OCZ news in their forums and TRIM has not been released yet. –  Pyrolistical Aug 6 '09 at 21:04
1  
Really? That's strange, because that page explicitly includes the following quote: "With the latest firmware update you also get a TRIM tool which other SSD manufacturers have failed to implement so far." Strange that they would falsely claim a feature they don't have, but it wouldn't be the first time a company did so. –  ChrisInEdmonton Aug 6 '09 at 22:31
1  
That's a review site that got it wrong. I think what they meant to say is the latest FW has idle garbage collection. –  Pyrolistical Aug 6 '09 at 23:55
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.