3

I'm in no way experienced with setting up RAIDs or using SSDs, but I'm considering purchasing a SSD RAID setup (potentially RAID 10, but maybe RAID 0) and I've been doing a lot of research. A lot of people are saying that the lack of TRIM means that performance will degrade horribly over time, due to having to rewrite semi-written blocks repeatedly.

From my very vague understanding of the problem, I thought that maybe running a disk defrag would be able to push all the scattered data of an aged set of drives into concentrated blocks, leaving lots of free blocks ready for fast writes, perhaps solving the whole issue.

I was just wondering if someone with a better understanding of the workings of SSDs and RAID setups could tell me whether an occasional defrag could solve the "lack of TRIM" problem?

Also, is the lack of TRIM even an issue since modern SSDs do some of their own garbage collection?

Thanks in advance

2
  • possible duplicate of Is it worth buying SSDs for a RAID?
    – Diogo
    Jun 26, 2012 at 17:25
  • I saw that thread, but I wanted to know whether defragmentation would overcome some of the pitfalls of SSDs in RAID.
    – LukeGT
    Jun 26, 2012 at 18:07

1 Answer 1

6

Defrag a SSD will not improve performance, actually it could decrease performance due to the fact that a lot of file copies would be made, filling the SSD with more garbage to SSD garbage collector:

Defragmenting an SSD is a terrible idea, for several reasons:

The key benefit to SSDs is that they have virtually no seek time. Reading adjacent blocks of data is no faster than reading blocks that are spread out over the drive. Fragmentation does not affect SSD drive speed.

As I discussed in my SSD Remaining Drive Life article, SSD drives physically wear out as you write to them. Defragmentation software moves around all the files on your drive. Thus, defragmenting an SSD reduces its life span without giving you any benefits.

SSD drives deal with the limited lifespan of their memory cells by using wear-leveling algorithms. These algorithms take advantage of the fact that fragmentation does not affect the drive’s speed. They purposely fragment the drive so that its cells wear out evenly, even if you’re constantly overwriting a small set of files (e.g. database fiels) and never overwriting other files (e.g. operating system files).

Modern SSDs even lie to the operating system. If the operating system tells the drive to save a file in blocks 728, 729, and 730, the drive may decide to write it to blocks 17, 7829, and 78918 instead, if it determines that those blocks haven’t been worn out as much yet. The drive keeps a lookup table of all its blocks, so that when the OS wants to read blocks 728 through 730, the drive reads blocks 17, 7829, and 78918. With such drives, defragmentation software can’t possibly work. The software will think and tell the user that file X was nicely defragmented and stored in blocks 728, 729, and 730, while it actually has no idea where the data is stored physically on the drive.

Conclusion: don’t waste your time and your SSD’s life expectancy by defragmenting it. The automatic defragmentation in Windows 7 skips SSDs automatically. In Vista, you can disable it via the Performance Information and Tools item in the Control Panel. I do strongly recommend you upgrade to Windows 7 if you have an SSD, so you get TRIM support.

3
  • Thanks for your answer, it was very clear. I was wondering if you would be able to elaborate on whether the lack of TRIM is really an issue or not?
    – LukeGT
    Jun 26, 2012 at 18:12
  • 1
    I don't know much thing about TRIM, but I know that new SSD devices are comming with better firmwares that are correcting many of TRIM issues...
    – Diogo
    Jun 26, 2012 at 18:14
  • 2
    TRIM will always help the drive do a better job. Earlier drives had write performance fall off a cliff once you had written to every block on the drive at some point during its lifetime, leaving the drive with no free erase blocks. This is fixed with TRIM, but can also be significantly mitigated by the drive internally keeping a reserved pool of erase blocks that you can never write to, or by you making sure you never write to some parts of the disk by, for instance, leaving several mb of unpartitioned space.
    – psusi
    Jun 26, 2012 at 18:47

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .