I have a Windows 2012 server configured with two SSD under a Software RAID 1 (controlled by Windows), under that configuration the optimization tool is not supported.

Is the TRIM still scheduled/performed by the OS, just not visibly so, and with no manual controls?

Is there a way to force it, given it's a simple mirroring RAID, and the OS is capable of TRIM when the SSD are not RAID'ed?

I found an "option" early on, but it's obviously not suitable for use in production: detach one disk from the raid (thus killing the RAID), perform the TRIM on the single-disk, then rebuild the RAID.

(the SSDs are 120GB Intel Sandforce in case that matters, they host several databases, are under constant read/write 24/7, and there is a data rotation of several gigabytes per day)

  • possible duplicate of Is TRIM possible on SSD disks in RAID 1? – JamesRyan Nov 20 '14 at 15:01
  • 2
    @JamesRyan That refers to hardware RAID1, where the Trim/Unmap commands would almost certainly be dropped by the hardware controller that doesn't support them (though it's certainly possible that the hardware controller does support Trim/Unmap pass-through). – Chris S Nov 20 '14 at 15:18

Windows software RAID only supports Trim/Unmap pass-through for RAID-0 at this time.

However, Sandforce (and most other SSD chips) will pickup that a block is being zeroed and mark the block for garbage collection instead (what Trim would do). You can force Windows to zero unused disk space with the cypher /w X:\ command. This does not work on encrypted drives.

  • Interesting info! Does this mean that running the old VHD precompactor utility would work as well? (was used to zero all unused sectors on a disk for compaction with the old VHD format) – Eric Grange Nov 20 '14 at 16:07
  • Probably, it would depend on what the precompactor does... – Chris S Nov 20 '14 at 16:08
  • 1
    Finally did it with sdelete to avoid having to manually break when its 1st pass is done. Just after doing it, SSD I/O fell down for a while (probably because of GC), but then shot right back up to "mint" performance. – Eric Grange Nov 21 '14 at 8:42

See Is TRIM possible on SSD disks in RAID 1?

What you are asking for does not make sense. TRIM is an ongoing process not a once off pruning and it can't work in conjunction with RAID.

But the drives will still do their own background garbage collection so it is something you simply do not need to worry about.

  • 1
    What do you mean? This a Software RAID 1, in which the OS itself mirrors the content, the same TRIM commands can be send to both drives. Also SSD GC is no substitue for a proper TRIM. – Eric Grange Nov 20 '14 at 16:03
  • 1
    @EricGrange on the contrary, modern GC and overprovisioning have dramatically reduced the advantage of using TRIM. – JamesRyan Nov 20 '14 at 16:10
  • 1
    Maybe they're not modern enough :/ Reduced SSD performance is what prompted me to investigate the issue again: server has been up for about one month 24/7, never been idle during that time, and apparently GC needs idle times. – Eric Grange Nov 20 '14 at 16:35
  • @EricGrange No GC does not need idles times, SSDs are not confined to doing one operation at a time. How much free space are you maintaining on these drives? I've only seen performance impacted on drives that are close to full. – JamesRyan Nov 21 '14 at 13:12

The entire path the data takes from the OS to the SSD needs to support the pass trough of TRIM commands.

Generally the issue is that the hardware RAID controller does not pass trough the TRIM commands.

Software RAID should be able to pass trough the TRIM commands as long as you use a normal controller (LSI HBA SAS controller or something).

The arguement that overprovisioning reduces the advantage of TRIM is somewhat faulty since overprovisioning just means the SSD has more space to use than you realize and you can fill this space up just as easily which will result in the same lower performance but it takes a little longer to get to that point. Normal disks have around 7% overprovisioning, Enterprise disks have 25%+ overprovisioning but in the end you fill them up and you'd be in the same place.

We have this issue with one of our systems at the moment and we will probably switch from using a LSI RAID controller to an LSI HBA SAS controller to make sure the TRIM commands get passed on. Another solution is getting a JBOD but that's a little more expensive than changing controllers. We have Enterprise disks in RAID 1 that are less than a year old but even with the overprovisioning and garbage collection the performance has dropped significantly.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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