LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 07-26-2009, 11:19 AM   #1
undoIT
Member
 
Registered: Jan 2009
Distribution: Fedora, Ubuntu, Mint, Sabayon
Posts: 35

Rep: Reputation: 15
Linux & SSDs (Solid State Disks)


With the new Intel G2 SSDs coming out, I'm thinking about upgrading my hard drive. However, there seems to be an extra level of software support needed for SSD drives. From what I have read there can be performance degradation over time and other issues.

Does anyone know how well SSD drives are supported in Linux and also if there is support for the TRIM command or if it is planned?
 
Old 07-27-2009, 09:28 AM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,702

Rep: Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896
Solid state hard drives are form fit function of a standard hard drive interface i.e IDE, SATA, SCSI etc and no additional drivers are required. Since SSDs do have a limited write/erase lifespan there are several tweaks that can be done help. If you have enough memory eliminating swap would help too. There have been tests performed that show that under normal conditions and normal usage the drive will not wear out prematurely. SSD drives have built in wear leveling logic. I am not aware of any performance degradation over time and haven't noticed any with the SSDs in my systems (mini-itx, SATA SSDs).
 
Old 09-19-2009, 09:52 AM   #3
undoIT
Member
 
Registered: Jan 2009
Distribution: Fedora, Ubuntu, Mint, Sabayon
Posts: 35

Original Poster
Rep: Reputation: 15
So, has anyone actually tried one of the new Intel G2 SSD drives? And, can you verify that TRIM is working?
 
Old 09-19-2009, 03:00 PM   #4
hw-tph
Senior Member
 
Registered: Sep 2003
Location: Sweden
Distribution: Debian
Posts: 3,032

Rep: Reputation: 58
Trim has been implemented in the Linux block device layer since 2.6.28. I do not know if intelligent scheduling of discard requests (which triggers the trim ATA command) has been implemented yet though.
 
Old 12-13-2009, 12:30 AM   #5
Oreo
LQ Newbie
 
Registered: Dec 2008
Posts: 16

Rep: Reputation: 0
Bump!

Does it matter if I'm using AHCI mode or IDE mode for the trim command to work properly?

Also, if the trim command isn't being initiated automatically, is there a user initiated option?
 
Old 12-14-2009, 12:37 AM   #6
Electro
LQ Guru
 
Registered: Jan 2002
Posts: 6,042

Rep: Reputation: Disabled
SSD based on NAND Flash memory wearing out is a "I do not know factor," so one manufacture will say something and other will say something else. If you are worried about the SSD failing, use DRAM based versions. They will last longer than NAND Flash memory and they have better performance. Unfortunately DRAM based SSD require battery back up to keep the data.

The following device could be a better alternative to NAND Flash memory based SSD.

ACARD ANS-9010
http://www.acard.com.tw/english/fb01...&type1_idno=13

I recommend use ECC memory if you want your data be reliable for a long time. If you use non-ECC memory, your data will eventually get corrupted.



The fancy "TRIM" command may not fix the issue of wearing out a NAND Flash memory based SSD less than not using the "TRIM" command. Using AHCI mode of the storage controller depends on the controller itself. Enabling AHCI for SATA controllers may penalize performance or it may not.


The disadvantage of using NAND Flash memory based SSD is data does not last longer than 10 years and wear-n-tear happens around 5 years. The wear-n-tear value assumes constant writing data every second.

Mechanical hard drives can hold data for centuries. If you treat them nice, they can last longer than ten years.
 
Old 12-14-2009, 05:37 AM   #7
Oreo
LQ Newbie
 
Registered: Dec 2008
Posts: 16

Rep: Reputation: 0
The TRIM function isn't about SSD longevity, it's about SSD write performance. So my question still stands:

Does it matter if I'm using AHCI mode or IDE mode for the trim command to work properly in linux?

Also, if the trim command isn't being initiated automatically, is there a user initiated option?

I'm using the latest Mandriva if these questions require that specific info.
 
Old 12-15-2009, 12:19 AM   #8
Electro
LQ Guru
 
Registered: Jan 2002
Posts: 6,042

Rep: Reputation: Disabled
Quote:
Originally Posted by Oreo View Post
The TRIM function isn't about SSD longevity, it's about SSD write performance. So my question still stands:

Does it matter if I'm using AHCI mode or IDE mode for the trim command to work properly in linux?

Also, if the trim command isn't being initiated automatically, is there a user initiated option?

I'm using the latest Mandriva if these questions require that specific info.
You are thinking too hard about the issue. Since NAND Flash memory based SSD have a lot lower latency and the sizes of program files in Linux is small, SSD paints a better picture for loading programs up faster instead being elephant throwers. How small program files in Linux? Well, it is lower than a megabyte. Some might be close to ten megabytes. If you are scared about throughput or bandwidth stick to regular hard drives or use DRAM based SSD. One thing you should learn is that latency always rules the performance of computers, so it is best to find storage that has the lowest latency. Throughput can always be increased manually using RAID.

If you want to get answer to this question, you should ask the same question in a kernel mailing list at kernel.org. I suggest use NAND Flash memory based SSD for what it is intend which is lower latency. If you want bandwidth out of NAND Flash memory based SSD, than you have to understand about NAND Flash memory that write performance is poor. When SSD start using FRAM than everything will change because FRAM is as fast as DRAM.

Personally I can care less for NAND Flash based SSD because it is the wrong way to introduce SSD. DRAM based is still the best for SSD.

I still stand on that in order for the fancy "TRIM" command to work depends on your storage controller. Also I do think it matters what mode, but your controller have to be compatible to pass the fancy "TRIM" command. Third not all controllers are compatible with all the ATA and SATA commands.
 
Old 12-15-2009, 07:03 AM   #9
Oreo
LQ Newbie
 
Registered: Dec 2008
Posts: 16

Rep: Reputation: 0
I appreciate your thoughts on my questions Electro, but you're assuming too much about my reasons for those questions.

I'm using an Indilinx / Barefoot controlled SSD which does (pending firmware update) support the trim function. Indilinx has had some major issues with firmware problems lately specifically related to severe write performance degradation, and support for the Trim command. I'm not talking about a marginal difference in throughput here, my computer kept freezing.

Further, both AHCI and IDE modes support the Trim command generally, but I'm asking specifically about the linux implementation. For instance, in MS Windows, the default MS AHCI drivers are the only ones that do support the Trim command while the Intel, and other after-market drivers do not. Software support is just as important as hardware / firmware support.


Does it matter if I'm using AHCI mode or IDE mode for the trim command to work properly in linux?

Also, if the trim command isn't being initiated automatically, is there a user initiated option?
 
Old 12-17-2009, 01:48 AM   #10
Oreo
LQ Newbie
 
Registered: Dec 2008
Posts: 16

Rep: Reputation: 0
Another question...

Crucial (the manufacturer of my SSD) has a simple "wiper" program that can be manually run in Windows to perform the "trim" function periodically. If I ran this simple windows executable file in Wine or a virtual machine would the trim command be properly passed to the SSD?
 
Old 12-19-2009, 04:39 PM   #11
Electro
LQ Guru
 
Registered: Jan 2002
Posts: 6,042

Rep: Reputation: Disabled
Quote:
Originally Posted by Oreo View Post
I appreciate your thoughts on my questions Electro, but you're assuming too much about my reasons for those questions.

I'm using an Indilinx / Barefoot controlled SSD which does (pending firmware update) support the trim function. Indilinx has had some major issues with firmware problems lately specifically related to severe write performance degradation, and support for the Trim command. I'm not talking about a marginal difference in throughput here, my computer kept freezing.

Further, both AHCI and IDE modes support the Trim command generally, but I'm asking specifically about the linux implementation. For instance, in MS Windows, the default MS AHCI drivers are the only ones that do support the Trim command while the Intel, and other after-market drivers do not. Software support is just as important as hardware / firmware support.


Does it matter if I'm using AHCI mode or IDE mode for the trim command to work properly in linux?

Also, if the trim command isn't being initiated automatically, is there a user initiated option?
If your computer kept on freezing, that is a different problem.

I have given you enough time to find it, but it seems you have not found it. Again not all ATA and SATA controllers supports the "TRIM" command, so again in order for the TRIM command to work you will need a storage controller that supports it.

It is easy to find the option about forcing to implement a like "TRIM" command in the kernel but you have to use at least kernel version 2.6.28. The following explains about the command in kernel version 2.6.28 and up.

http://www.kernel.org/doc/menuconfig...AL_TRIM_EXCESS

The documentation for Documentation/nommu-mmap.txt.

http://www.mjmwired.net/kernel/Docum...nommu-mmap.txt

You are being too picking what mode you should set your controller because your controller have to support it anyways. If your controller supports the "TRIM" then it does not matter what mode. Also ATA in Linux is shared with SATA by now and ATA is set as SCSI, so again it does not matter for it.

I suggest set the block size to close to 512 kilobytes to reduce penalty throughput. The only file system that supports UNIX permissions, that Linux supports, and can handle close to 512 kilobytes block size is XFS. XFS limits its block size to 64 kilobytes. Again throughput fellows behind latency because latency rules performance in computers.


Quote:
Originally Posted by Oreo View Post
Another question...

Crucial (the manufacturer of my SSD) has a simple "wiper" program that can be manually run in Windows to perform the "trim" function periodically. If I ran this simple windows executable file in Wine or a virtual machine would the trim command be properly passed to the SSD?
Can not be done because WINE is a Windows application emulator and not a Windows driver emulator. Also using a program like VMware to run your wiper utility will not work because the whole physical drive have to be added to the virtual machine. A physical disk can not be used or mounted with Linux and be used with VMware at the same time.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Linux Solid-State Drive Benchmarks LXer Syndicated Linux News 0 01-02-2009 03:10 AM
LXer: Linux Solid-State Drive Benchmarks LXer Syndicated Linux News 0 01-01-2009 01:50 PM
LXer: Intel’s Linux, solid state speedup LXer Syndicated Linux News 0 08-29-2008 03:00 PM
Procedure to Develope solid state storage device Linux operating Susyem krishna_karne Linux - Kernel 1 01-12-2008 01:36 AM
SOLID STATE HARDISK on LINUX boost performance speed Bobymc Linux - Hardware 1 04-29-2006 05:58 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 10:45 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration