Should You Defrag an SSD?

With a lot of more modern computers using SSD’s (Solid State Hard Drives), one question I often get asked is if you need to defragment a SSD. That’s a good question because up until now, pretty much everyone has defragged their computer at least once.

So why do we defragment a hard drive in the first place? Well, I won’t go into super detail here since you can read about it online, but basically it’s because spinning hard drives taker longer to read data that is “fragmented” or stored in multiple locations on the hard disk. Since spinning hard drives read and write data sequentially, it will take longer for the hard drive to read a file if parts of the file are located on different parts of the disk as compared to being located altogether in one unit/space.

ssd defrag

So defragmenting a normal spinning hard drive can be useful depending on the size of your drive, the number of files you have stored and the size of those files. Now the question becomes is defragmenting useful if the hard drive has no physical moving parts?


Well, the answer to that question is pretty easy once you understand the difference between an SSD and a HDD. An SSD is basically non-volatile flash memory, which you are probably used to using in your digital camera, etc. An SSD is fast because it randomly accesses memory instead of sequentially like an HDD. SSD’s are great, but there is one huge caveat that most hard drive manufacturer’s never mention about SSDs and that’s their lifespan.

Because of the way they are built, an SSD wears down every time they are written accessed. If you have read reviews of SSDs before, you have probably read about how an SSD will get slower if you benchmark it after completely filling the drive and then erasing it. With a HDD, you would never have that problem. Most people mistakenly think SSDs are safer than HDDs because they have no moving parts. This is not true. Flash memory has a very finite lifespan and the more it is used, the more quickly it will fail.

So back to the question of defragmenting. When you defrag a hard drive, especially a SSD, it will end up causing tons of small write accesses, which will reduce the lifespan of the hard drive. And since data is not being read sequentially, it doesn’t matter if the file is stored in a hundred different places, the performance will remain the same.

So, no, you should not defrag an SSD. And performing one will actually reduce the life of your drive. All of the SSD manufacturer’s know of this problem and they have come up with an optimization technique with the use of the TRIM command.

Currently, with HDDs and SSDs, if you delete some data on the hard drive, the operating system does not actually remove the content from the disk, it just deletes the pointer to the address and therefore “deletes” the data. That’s probably why you’re heard of secure delete or government security file deletion, which actually overwrites the deleted data with gibberish so no one can use advanced tools to read data later on.

This issue of data not actually being deleted is what causes the lifespan of SSDs to be reduced. If the drive knew which areas of memory didn’t contain any important data, it could simply re-use it for new data. The TRIM command is supported by the latest SSDs and will optimize the hard drive so that it reduces the number of writes/deletions and therefore extends the life of your SSD significantly.

If you’re in the market to buy an SSD, make your choice very carefully. You want a hard drive that supports the TRIM command. Some of these include:

  • Intel X25-M and X18-M G2 G2
  • Indilinx Barefoot
  • SandForce SF1200 / SF1500 Force
  • Samsung RBB
  • Samsung 470

There are a lot of other SSDs that support the TRIM command, but you have to check with the manufacturer. Note that Windows 7 natively supports the TRIM command for hard drives that support it, so you don’t have to do anything. Older versions of Windows do not support the TRIM command. In the case of Windows XP and Vista, the OS cannot even tell the difference between an SSD and a HDD, so it’s best to turn off the Disk Defragmenter.

You can also use third party programs that support TRIM to run on systems not running Windows 7. If you don’t believe everything I’ve said, then you can check out this post from a more reliable source that details exactly why it’s not a good idea to defrag a SSD:

If you have a different opinion or something to add, please feel free to add a comment! Enjoy!

Comments [10]

  1. There is software available that PREVENTS fragmentation on hard disk drives thereby avoiding the necessity of actually having to move data around on the disk to achieve de-fragmentation. The way it works is by allocating a larger size than the operating system provides for data written to the disk. This way data does not become as fragmented as it normally would and therefore the need for de-fragmentation is reduced.

  2. 1. How does one tell that a SSD is approaching its replacement or failure point? and

    2. What is the effect of backing up a SSD on its lifespan?

  3. You are mistake that a hard drive is a sequential device – it is random, just as is the SSD. The difference in access time is due to the difference of mechanical vs electrical; setting a new address in an SSD takes nanoseconds, but moving the hard drive’s head to the new address may take milliseconds. Tape is a sequential device.

    Good point about the SSD’s lifespan, though.

  4. SSD life spans are typically longer than most computer lifespans (due to replacement or upgrade) so lifetime is not a issue. I have personally been using an external SSD for 6 years (not nearly as good as what is out today) and used it everyday (for work) and it is still running strong.

  5. I heard there are HDDS which are both SSD and mechanical parts, and, are they good??

  6. If you’re getting ready to update to an SSD, prep your image before you clone. Do all the NEW installs for the image on a HDD then re-gen / prep the image via the HHD. When the image is laid down onto the SSD it’s very likely that the image will never need re-imaging as long as there are no new installs. In an environment where images are pushed to the desktop, this adds useful life to the SSD.

    The HDD still has its place, in the SSD environment as the image prep method while SSD takes over the runtime environment. One day, this will be a moot point if not already. I change our laptop and desktop drives every 48 months, regardless; used to be 24 months. For the standalone desktops, and there’s always a few, I put both an SSD and a HDD, with the SSD as the primary and the HDD as an unplugged primary. When updates occur, I switch to the HDD, update, then dump-restore the HDD to the SSD. Once complete, they swap roles.

    For laptops, I have a small inventory of cataloged 2.5 HDD’s that contain the images for the portable SSD’s. Imaging, even backing up for that matter, does not pick up the hidden deletes made over time, thus they’re not restored. As far as placing the swap file on the SSD, never gave it a second thought not to. I’m going to toss the SSD in 48 months anyway. They’re degaussed by a vendor once they’re discarded. The most confidential SSDs are crushed then incinerated.

  7. Thank you for this write up, my son has a new SSD in his computer. Sent him this link here to him, he said he already read up on SSD drives prior to purchasing, and has the OS’s defrag utlity turned off. By the way son did say these SSD’s are amazingly fast!

  8. Actually I have been using SSDs in my laptops, computers, workstations and some lab servers for over 3 years. I have only seen 3 OCZ 60GB/120Gb fail (after firmware updates). All of the drives were replaced by using RMA, no issues.

    Lifespan on current SSD is not a problem, the MTBF on SSD is twice the MTBF on regular hard drives.

    You explain lot of stuff in your article in very clear format, congratulations.

    BTW: there are some tools on the web to optimize / enable TRIM and other features if you use SSDs in your computer.

Leave a Reply

Your email address will not be published. Required fields are marked *