SSD TRIM question

HaX

[H]ard|Gawd
Joined
Dec 17, 2005
Messages
1,916
Well... i hopped on the kingston 40gb ssd deal... and happened to buy two of them. Now was wondering... after i do the trim work around and have it enabled.. how exactly do you use it? are there requirements for it to work properly. I'm little confused on what this whole TRIM thing is as I am new to ssds... also raid for that matter.. this will be my frist time with SSDS + Raid.. such great new adventure I can hardly wait.
 
You can't use trim if SSD's are in RAID.
 
Though true in some cases, you can if they are Intel based with the latest drivers. There is a thread around here somewhere.

*looks*

Ah, here we go.

Not true, that just means that you can have the controller on the mobo configured as RAID so that *other* drives can be in RAID, it still won't do Trim on the SSD's in RAID.

You didn't read that thread correctly.
 
These articles are wrong. Unfortunately, the vast majority of sites that posted those initial articles due to Intel's poor wording choice have not seen fit to update their articles with current information. The new drivers do NOT allow TRIM for RAID. What they do allow is pass through to SSDs not in an array, ie single SSD + RAID hard drives, TRIM now makes it to the SSD
 
My bad. Seems in my haste to rush out the door I referred to the wrong thread.

This is the thread I meant to link to. It refers to this article.

That first link refers to the same drivers as the thread you linked before, and that article is wrong, you can't get Trim with the drives in an actual RAID, you can have an SSD solo, and HDD's in RAID with the controller set to RAID and still get TRIM to the SDD, that wasn't possible before with the Intel RAID drivers.

EDIT: WC Annihilus beat me to it, but there's some more confirmation for ya.

Intel had me confused too with their wording, forum guys here and on the OCZ forums set me straight.
 
Again, my bad. Thanks for the clarification.

I almost bought a second one due to that thread/article, but have other commitments so didn't. Thankfully I am now properly informed.

Hate making a fool of myself, (P.S. Plus doling out incorrect info.) but there ya have it. :D
 
Hardly a fool, it had people confused and still does, Intel didn't word their driver page for this very well. It got all the news sites, took some real enthusiasts to pick it apart though, people with multiple SSDs and no attachment to their data lol.
 
so if i stick with raid w/o trim should i be worried about anything. maybe someone can tell me what trim is? I'm little confused by it.
 
What if you use windows raid, will it do trim then? I am assuming not but thought I would ask.
 
so if i stick with raid w/o trim should i be worried about anything. maybe someone can tell me what trim is? I'm little confused by it.

The problem arises from the fact that NAND flash on SSDs can't simply be overwritten like data on a HDD. To overwrite a block data, you actually have to cache the pages which still hold valid data, erase the whole block, then write the cached data and the new data back to the pages in the block (which is much slower than simply writing the data to empty pages). When the drive is new, it has a bunch of free pages, and the firmware will simply redirect new writes to empty blocks, so that it doesn't need to overwrite old data. But once all the blocks have been written to at least once, then it'll have to do the cache-erase-rewrite process any time it wants to write data.

With TRIM, the OS tells the SSD when data is deleted. The SSD can then actively go in and erase those pages pre-emptively, which means more available empty pages that can be immediately written to. Without TRIM, the old data is left in the SSD's pages which leads to the cache-erase-rewrite situation. In the standard wear-leveling and stuff, the SSD will also be copying those invalid bits around (because it doesn't know that they're no longer valid), so the fact that TRIM cleans them up means less bytes being written to the flash, which should extend the lifespan too.

Intel SSDs (I'm not sure about other brands) will use any empty space as spare area. Think of this as temporary working space. They come with about 7% free space that isn't accessible to the user. Even if your drive is completely full, you'll still have a few GB of spare area. When you overwrite a file on the full SSD, the controller can remap it to that spare area and write it instantly, then go erase the blocks where the file was previously located (making that location the new spare area). The more spare area you have, the less likely you are to run out of erased blocks that are available for instant writing.

Gains have been shown up to 30% or more spare area. If you want to reduce performance degradation and wear on the drive, leaving some unpartitioned space on the RAID array will help. If you can handle losing the space, leaving up to 20% of the drive unused would probably help performance, though even 10% or less can only help.
 
will trim eventually be supported on raid?

according to a recent post (scroll down) on the intel forums, the intel developers are not currently working on TRIM support for SSD in RAID.

try AS Cleaner with FF on. worked for me.

before:

as-ssd-bench.png


after:

as-ssd-bench2.png
 
ill is running as cleaner basically doing the same thing as trimming it? Is the gain worth the cost for the raid 0? Like the op states I am in the same situation but almost the same setup as illdikili (2x80gb g2's) that im considering creating a raid 0 on.
 
I've noticed that the Intel Toolbox Optimizer seems to fill up the free space like AS Cleaner does. Without really examining it that closely, it seems like AS Cleaner is pretty similar. You should do some testing on your setup to make sure it's working (do lots of writes & deletes, benchmark, run AS Cleaner, then benchmark again), but it seems like it should work.
 
Just leave some space unused; like 10GB per SSD. So with RAID0 of two SSDs that would be 20GB.

That would make sure you're not degrading rapidly, as the SSD has more internal space to prevent internal fragmentation causing higher write amplification.
 
If you're running two of them in RAID then TRIM is irrelevant anyway (for now), as it's currently not supported by the RAID drivers for any controller out there (Intel or otherwise). What you should do instead, is not format them to their full capacity but leave some spare area on both drives... The drive's controller will use this spare unformatted unallocated area as scratch space and it'll mitigate the need for TRIM over time (tho w/RAID the performance loss over time that happens w/o TRIM is more subdued anyway).

If you're just using one of them then TRIM just happens automatically whenever you delete a file, that's the value of TRIM... You can always force a manual TRIM cleanup using the Intel Toolbox Optimizer but it should be unnecessary.

Also note that if the performance of your RAID array ever gets bogged down enough you can always do a secure erase to restore it, you can also do that if you want to reserve some space for the drive's controller to use but you've already formatted it (just shrinking your current partition won't work). TRIM is nice to have, but if you're not copying a lot of data to the drives constantly and you're just using them as OS drives, it's not a huge concern. At worst you'd have to do a secure erase every couple of years to refresh them.

You might not even have 'em by the time it'd matter... :p I was tempted to get a 40GB Kingston drive when they were on sale for $75 to RAID it along w/my current X25-V (on the desktop, I'd take the 80GB X25-M that's currently there and move it to my netbook), but other tech lusts kept me from doing so... I might still buy one off a friend that jumped on it if he's unhappy with it, heh.
 
Last edited:
Just leave some space unused; like 10GB per SSD. So with RAID0 of two SSDs that would be 20GB.

That would make sure you're not degrading rapidly, as the SSD has more internal space to prevent internal fragmentation causing higher write amplification.

How do I do this exactly. Do I partition each drive so it's at the 30GB mark instead 40, then go into raid config and them put them in raid 0? Or can this all be done inside of raid configuration.. sorry .. new to all this.
 
With two "virgin" (never used) drives; create the RAID0, then insert Windows DVD and install Windows 7, create a manual partition and make it at least 20GB smaller; i.e. 10GB per drive.

So you don't partition individual drives, but the RAID array itself. So one big C: drive and 20GB of unused/unallocated space. Never use that 20GB space; it will be used by the SSD itself.
 
Back
Top