running TRIM on SSD RAID

ann0yanc3

Gawd
Joined
Nov 27, 2004
Messages
515
I know it's not possible to run TRIM while in RAID, but how would I go about running TRIM every once in a while? I don't mind re-formatting and taking the drives out of RAID and running TRIM, but I don't see a utility that will allow me to do so without having to install Win7 first.

I have 2 80GB X-25M G2's.

Thanks.
 
You can use the Intel SSD toolbox which includes the SSD optimizer tool that basically acts as a manual trim command. Toolbox. It only works with G2 drives which you have, and with Win XP, Vista or Win 7. It doesn't matter what you have your mobo controller set to (IDE,AHCI,RAID), as long as your drives aren't a part of a RAID array the SSD optimizer tool will work.
 
Last edited:
Your best bet is to reserve space for the SSD to use internally; by creating a partition that is smaller than the full capacity. So if you got 2x80GB=160GB, create a partition that's 140GB large, for example.

Be aware though, that before you do this the 'unused' space has to be 'virgin' - meaning that you did not write to this location before. If you previously had a partition that spans the entire drive, or used them as single drives; do a secure erase or zero-write first. That would make sure the space you reserve for the SSD actually will be used by the SSD. It won't be used if you previously written to that location, even after deleting those files.

So either do this when you get the drives for the first time, or if the drives are used, do a zero-write/secure erase before setting up the RAID and partition table. Since you use Windows 7, you won't have any misalignment issues like XP has.

The reserved space will be used by the SSD to remap small writes that otherwise would have required a slow and 'expensive' full block read/erase/program cycle; which are very slow. With this trick, you may not need TRIM at all. Though you may wish to zero-write and resetup every few years or so.
 
Your best bet is to reserve space for the SSD to use internally; by creating a partition that is smaller than the full capacity. So if you got 2x80GB=160GB, create a partition that's 140GB large, for example.

Be aware though, that before you do this the 'unused' space has to be 'virgin' - meaning that you did not write to this location before. If you previously had a partition that spans the entire drive, or used them as single drives; do a secure erase or zero-write first. That would make sure the space you reserve for the SSD actually will be used by the SSD. It won't be used if you previously written to that location, even after deleting those files.

So either do this when you get the drives for the first time, or if the drives are used, do a zero-write/secure erase before setting up the RAID and partition table. Since you use Windows 7, you won't have any misalignment issues like XP has.

The reserved space will be used by the SSD to remap small writes that otherwise would have required a slow and 'expensive' full block read/erase/program cycle; which are very slow. With this trick, you may not need TRIM at all. Though you may wish to zero-write and resetup every few years or so.

How do you expect that to work, where are you reserving this space? If it's not part of the partition, why would the OS write to it?
 
How do you expect that to work, where are you reserving this space? If it's not part of the partition, why would the OS write to it?

The OS doesn't, the SSD's controller uses it as additional spare area.

The controller should be able to erase spare area when it's done using it (since it knows there isn't any user data there). More erased blocks means less chance of having to do a cache-erase-rewrite.
 
The OS doesn't, the SSD's controller uses it as additional spare area.

The controller should be able to erase spare area when it's done using it (since it knows there isn't any user data there). More erased blocks means less chance of having to do a cache-erase-rewrite.

Yes, but how would the SSD know to use that unpartitioned area? There's already 20-25% spare mlc in the SSD to do this. Why would you purposely not partition part of the drive and then expect the SSD to use this unpartitioned space as a spare area, there's nothing to tell it to use that space, the OS doesn't know about it and at the controller level of the SSD, it just thinks it a normal part of the drive, it's just not in use.
 
Yes, but how would the SSD know to use that unpartitioned area? There's already 20-25% spare mlc in the SSD to do this. Why would you purposely not partition part of the drive and then expect the SSD to use this unpartitioned space as a spare area, there's nothing to tell it to use that space, the OS doesn't know about it and at the controller level of the SSD, it just thinks it a normal part of the drive, it's just not in use.

It would depend on the controller's programming. The Intels will use any empty blocks as spare area, including unused area in the "user space" (other brands may or may not do this). Leaving some unpartitioned space ensures that you don't ever put user data there, essentially forcing it to be spare area rather than user area. The X25-M ships with 7.3% spare area (the difference between a GiB and a GB). If they came with 20-25% spare area, it wouldn't be as big a deal, but the mainstream drives only come with the 7.3%.
 
Didn't realize Intels would use unpartitioned space as spare space, that's good to know. I have all Indilinx drives with trim and GC firmware, so the ones I have in RAID 0 just use the GC function which seems to work well.
 
Indillix's GC algorithm seems to work remarkably well if you let it... The end result is as good as having TRIM really. The system has to be idle for a bit in order for it to kick in from what I've read tho (admittedly not much, OCZ's own boards are probably a better source of info on this), I think I read that simply logging off your user tends to suspend most processes so that GC is allowed to do it's thing... Just keep in mind that DC apps (F@H) or something else (AV, etc) that takes up idle time could potentially interfere w/that.
 
Back
Top