Hardware RAID Controller Support for SSD TRIM

Solution 1:

I don't know of any RAID controller that supports TRIM commands.

As your Wikipedia link explains, the TRIM command provides a way for the file system to tell an SSD when a block of data is no longer needed. For example, after a file is deleted.

Life gets more complicated if you have a RAID layer between the file system and the SSDs. First you need to update the RAID software (or firmware) to accept TRIM commands from the file system. Then the RAID layer has to figure out what to do with them. For RAID 1 (mirroring) it would be pretty straight-forward. RAID would just pass the TRIM commands to the underlying SSDs.

For parity-based RAID, however, there's not much you could easily do with TRIM commands. Even when the file system is done using a block, you can't TRIM it, as RAID needs the contents of the block for parity calculations. RAID could subtract the block from the corresponding parity block and then TRIM it, but you've now added 3 extra I/O operations so you can get an unknown gain from issuing the TRIM command. I can't see how this would be worth it.

All in all, the SSD TRIM command is still quite new. Many SSDs don't support it, and I'm not even sure how many file systems have support for it. So it is likely to be a while before RAID systems start supporting it.