Intel SSD's in RAID 0 and using TRIM

avianrand

Distinguished
Apr 18, 2010
155
0
18,680
Okay, sorry, but I'm really unclear on this issue. I've read as much as I can find on it and not getting anywhere. I just installed 2 Intel 80GB X25-M (G2) in RAID0. New windows 7 64bit installed on them. I keep reading all sorts of conflicting info on TRIM for RAID SSDs.

The guy at the end of this thread http://www.overclockers.com/forums/showthread.php?t=607110 says it's coming per Intel's help file. And it is in there. I checked.

This guy says it's there too (or going to be) http://www.guru3d.com/news/intel-brings-trim-to-ssds-in-raid/ and it looks pretty convincing.

But this page http://www.intel.com/support/chipsets/imsm/sb/CS-031491.htm says it was a mistake. So as of version 9.6.0.1014 it's not there. I ran the toolbox and everything is grayed out because the SSDs are RAIDed. But on the menu for the toolbox there's no mention of TRIM at all.

There are a couple of threads in this forum that suggest that it's still not possible but they are at least a few weeks old.

Is there something else from Intel that does allow us to TRIM RAIDed SSDs? Most of the info I found in this forum is from a month or more ago. Also unclear on whether this inability to run TRIM affects the drive physically over time or could you write zeros and reinstall everything a year from now (not something that excites me!) and get back the same performance (assuming TRIM never becomes available for this type of setup).

Is the best practice still to leave 15GB or so unallocated? (sorry, not clear if it should be an unallocated partition or just a partition you don't use at all). And related to this, when Win7 gets to the drive choice screen, when you choose the drive it automatically leaves 100MB or so for system. I assume the extra 15GB for getting around TRIM cannot be part of that? So in effect you end up with 3 partitions, 1 allocated for system, 1 allocated for OS and such and 1 at 15GB unallocated?

Also, one of the threads in here suggested doing a full format when installing Win7. I asked about that in another thread and was told you can't. Is this actually possible? If it is, how? Or is it better to do the zero-write/secure erase (is this something that you have to iso to a CD and run from a DOS prompt? - could someone explain?)

Thanks,

A.
 

sub mesa

Distinguished
The newer driver allows you to use TRIM on SSDs connected to the onboard RAID controller in "RAID" mode, while the SSDs themselves are not part of a RAID.

Previously, if you had a 2-disk RAID1 or RAID0 on onboard controller you couldn't have TRIM on your SSD which was not part of a RAID.

So if you want to RAID two or more SSDs, you will not have TRIM!

To cope with this, you should leave space unallocated (meaning: your partition is smaller than the full capacity; just keeping xGB free on your filesystem is not enough!)

Full format under Windows 7 (and windows 7 only!) will zero-write the drive, restoring original (factory) performance of an SSD. This is the same effect as you would perform a "Secure Erase" that clears the HPA mapping tables. The only difference is that the latter procedure does not require write cycles, so its more economical if you do it alot like benchmarking.
 
I have seen folks swear up and down that they have trim active on 2 SSD's in raid zero, but this is obviously currently up for debate.

If it is possible to enable trim for raid0, then it is currently only available for the x58 chipset. That is the driver sub mesa mentions, without the x58 you will not enable trim under any raid circumstances.

I think it may be possible to enable trim in raid 0 for some, but not for most.

I understand that garbage collection and other tweaks would be necessary, but totally worth it for raid 0 performance.
 

avianrand

Distinguished
Apr 18, 2010
155
0
18,680
My board is a Gigabyte GA-X58A-UD5 so it's X58 obviously.

sub mesa: In my OP I asked about full formatting during W7 install. Are you talking about formatting from inside Windows in Disk Management or are you talking about during W7 installation? If you're talking about during W7 installation, how is this done? Like I said, I've been told you can't but maybe that person was wrong. If you are talking about formatting after windows is installed, since this is the OS drive, how can you do that? Windows prevents you from formatting the OS drive.

Oh, and another question. I've not seen anyone talk about this idea. I hear about people reformatting their SSDs after a while and reinstalling everything but couldn't you just clone the SSD to an external drive, format the SSD and then clone back to the SSD? Seems logical that that would do the trick.
 

Just in case someone gets the wrong idea from this, you should not zero-write an SSD in order to clear it back to it's original state. Zero-writing every sector on the drive actually flags every sector as being "in use", which is exactly the opposite from what you want.

In fact, you should use a "Secure Erase" utility which, as sub mesa indicated, flags all of the sectors as being free. And sub mesa is entirely correct that under Windows 7 only a full format will do this by issuing a TRIM for the entire disk.
 

avianrand

Distinguished
Apr 18, 2010
155
0
18,680
Okay but what's not clear still is for those of us not experienced with this, where is this "secure erase" utility. I've looked and can't find it. Is it a cd boot disk type of thing so that you can get at the drives without doing it from windows? Or do you need to install windows 7 on some spare drive, boot from there and then use that to format the SSDs?
 

sub mesa

Distinguished
sminlal, are you sure about the zero write thing? I think if you write a page full of zeroes the SSD would free that LBA in the mapping tables. In fact, i thought that is how the Intel toolbox worked when you couldn't have TRIM it still can do TRIM manually by writing zeroes to unused sectors; that makes the SSD know that spot is not 'static' data anymore but becomes 'dynamic' i.e. not really allocated by the OS.

Never used the Windows intel toolbox suite, though. Worth looking up sometime. :)
 

sub mesa

Distinguished
At least newfs in FreeBSD suggests that zero-writing will free up blocks:

Code:
     The following options define the general layout policies:

     -E      Erase the content of the disk before making the filesystem.  The
             reserved area in front of the superblock (for bootcode) will not
             be erased.

             This is a relevant option for flash based storage devices that
             use wear levelling algorithms.

             NB: Erasing may take as long time as writing every sector on the
             disk.
 

avianrand

Distinguished
Apr 18, 2010
155
0
18,680
Typing "secure erase" into Google gives you the page to download the utility as the first search result:
http://cmrr.ucsd.edu/people/Hughes/SecureErase.shtml

I don't know how I missed that except that I was getting tired and frustrated so anything's possible. I typed "secure erase" into google countless times trying to find something that made sense. Knowing what google results to trust is the other problem. Thanks for being specific. Specific answers are very helpful.

Anyway, while I was waiting for an answer I found this: http://www.iishacks.com/index.php/2009/06/30/how-to-secure-erase-reset-an-intel-solid-state-drive-ssd/ and used that. Now, on my SSD's I only had previously installed W7 and a few other odds and ends. They only took up about 20GB of space. When I ran the the tool in this link from a DOS floppy it said it could take anywhere from 20 minutes to a few hours. It ran and said it worked but it only took maybe 1/2 minute. Seems strange. I did reinstall W7 and everything seems just as fast as it did before. Not that I'd probably notice any difference. But the fact that it only took 1/2 minute bothered me.


And I'm still wanting to know how you go about doing a full format of your OS drive from W7?
 

sub mesa

Distinguished
Secure Erase is not the same as zero-write; it does not touch the actual NAND cells it just erases the HPA mapping tables that remember which cell corresponds to LBA 1,2,3,4 etc.

I never did a secure erase using that procedure myself; but i would think half a minute sounds about right. If it took up to half an hour then you are zero writing; same result but this costs you alot of write cycles.
 

avianrand

Distinguished
Apr 18, 2010
155
0
18,680
Okay. Thanks. That clears things up a bit.

Earlier, sub mesa said the other way is to do a full format in W7. I'm still wanting to know if that's possible from the W7 install or if you have to have W7 installed somewhere else or on another drive and then format the SSD from there.


Second, I asked above about whether the degradation in an SSDs performance is actually permanent physical damage to the cells or just temporary that is corrected by TRIM or secure erase. From what I've read so far it sounds like both. That the drives slow down over time and you have to clear the NAND cells but that this also causes minor permanent damage to the cells over time giving them a limited lifetime regardless of TRIMing or secure erasing. One article talked about that limit being reached by the time you do 10,000 secure erase procedures. Well if you do that once a day it would take 27 years to get there which is hardly a concern but there must be other processes that cause permanent damage further reducing the lifespan of the drive. Apart from daily use, what are these processes?


Lastly, it occurred to me that things like swap files and all the temp files that programs like to put on the OS drive could contribute to these problems. Adobe Soundbooth for example creates HUGE temporary files in one of the Adobe installation folders when you work with large sound files. It would make sense that if you used Soundbooth very often then you would cause more damage to your SSD than if you were just typing up Word documents all day long.
 

sub mesa

Distinguished
Earlier, sub mesa said the other way is to do a full format in W7. I'm still wanting to know if that's possible from the W7 install or if you have to have W7 installed somewhere else or on another drive and then format the SSD from there.
Full Formatting under Windows 7 setup should reset the SSD to factory performance levels. Here's a quote of this article:

"Windows 7 requests the Trim operation for more than just file delete operations. The Trim operation is fully integrated with partition- and volume-level commands like Format and Delete, with file system commands relating to truncate and compression, and with the System Restore (aka Volume Snapshot) feature."

If that's true, it should work by formatting during Setup. However; if the TRIM does not work during setup then all this could be untrue. I doubt that's the case, however.

Second, I asked above about whether the degradation in an SSDs performance is actually permanent physical damage to the cells or just temporary
Temporary. The degradation starts when the SSD has no more free cells to use a 'trick' to enhance write performance. If it can't do its trick - for which it needs free cells available - then it has to 'fall back' to the original/normal behavior of read-erase-program cycle; which takes very long.

What is permanent is that excessive read-erase-program cycles will reduce the lifespan of the SSD, as a read-erase-program cycle takes a lot more write cycles than a "remapped" write (remapped or redirected to a free flash cell). We call this write amplification and Intel is generally one of the SSDs with the lowest amplification (=best). The ideal write amplification would be 1.00x while with read-modify-write you can go up to 20x. That means that writing 512 bytes would actually cost you 20 times that. The amplification is average over a given workload or product lifetime.

Some apps like Photoshop require/want the pagefile to exist; for 'normal' usage this can be safely disabled or reduced to 32MB; just like the hiberfil.sys used for hibernation can be disabled as well (google). That saves you some valuable space on your SSD.

Disabling the pagefile is a controversial subject though; some continue to argue that it is required and basically, the oceans will start boiling and it will be hell on earth. :D

Seriously; just try it out. If it causes any problems with Adobe software for example then just enable it, for example on a HDD instead of ur SSD.
 

avianrand

Distinguished
Apr 18, 2010
155
0
18,680
Full Formatting under Windows 7 setup should reset the SSD to factory performance levels. Here's a quote of this article:


"Windows 7 requests the Trim operation for more than just file delete operations. The Trim operation is fully integrated with partition- and volume-level commands like Format and Delete, with file system commands relating to truncate and compression, and with the System Restore (aka Volume Snapshot) feature."


If that's true, it should work by formatting during Setup. However; if the TRIM does not work during setup then all this could be untrue. I doubt that's the case, however.

Okay, but again, how do you full format during W7 installation? There is no option for this. When I previously installed on 2 640GB in RAID0 it took only a few seconds implying that it did a quick format. Other posts I've read say that W7 only does a quick format during install. There is no option to full format during installation unless there's some hidden key thing that is not documented anywhere.
 

avianrand

Distinguished
Apr 18, 2010
155
0
18,680
You have to click "advanced" to get to the options that let you create partitions and do formatting. I've done this about 10 times in the past few days as I've been doing testing. There's only one format button under advanced. It does a quick format. There are no options for full format (I know this because as I've said before it only takes a few seconds to run). You've been talking about full formatting during installation. I know that is possible under XP but from everything I've seen myself and everything I've read, I don't think this can be done under 7. Microsoft saw fit to remove that option as they are all wise of course. But because you keep mentioning it I thought maybe you know something that's different from everything else I've read says can't be done. Google "windows 7 full format" and you'll see what I mean. Now if they did remove it, that's a bit premature considering all this about having to clean up SSD's. Thanks Microsoft. :pfff:

By the way, during my last install, I did leave about 16GB unallocated so that TRIM is not needed per your instructions.
 

sub mesa

Distinguished
Hmm you may be right. Since i'm an Ubuntu Linux/BSD guy, i don't have to much experience with Win7 installs.

So should you ever want to reset performance again, a full format under a running Windows 7 should do the trick; or a secure HPA erase using HDDerase.exe.

 

Fin_33

Distinguished
May 1, 2010
7
0
18,510
What is permanent is that excessive read-erase-program cycles will reduce the lifespan of the SSD

How does this permanent degradation affect a RAID array if you add more SSDs to it later - say 1 or 2 years later? My current configuration has 2 SSD's in RAID 0, but I plan on adding 2 more SSD's to the array once the prices come down on the Crucial C300's. Will the older/slower SSD's cause any problems?
 

sub mesa

Distinguished
Note that i talked about permanent lifespan reduction. SSDs can always have full factory performance after a Secure Erase.

But not having TRIM and using the SSDs for a decent time would cause the SSD to have to perform many read-erase-program cycles and that causes more write cycles than usual. So when you write 20GB, the SSD may have physically written 80GB (write amplification factor 4.0). The factor can go much higher with smaller writes (20 - 30x).

If you then Secure Erase them, they would have factory performance again. But the used-up write cycles are permanent; you may have shortened the product lifetime. It will continue to function normally until the write cycle count reaches its maximum; where all write cells are at or near their maximum write cycle count; the SSD will not use them anymore for writing. So your device gets (semi) read-only.
 

That cannot be the case. If it were then it would not be possible to have a data file that contained long sequences of hex 00 bytes.

When writing to the SSD, the only way to tell the SSD that a block is no longer relevant is to use some other command than a "write data" command. If you do a "write data" with the data set to hex 00's, then the SSD is obligated to store the hex 00's so that a later request to read the same block will return the same data.

The code comments you quoted mention erasing but not zero-writing. I don't know what the actual code does, but I suspect it's not just doing "write data" of hex 00's....