Browse All Articles
> Solid State Drives and Defragmentation
Solid State (Hard) Drives aka SSD began to evolve in the computer industry recently. As the name suggests, there are no moving parts in the drives. The drive uses microchip memory store the data, as opposed to the spinning disks of a traditional HDD. So it consumes much less power and needs less heat dissipation.
To discuss defragmentation, we need to understand a little about the architecture difference between HDD and SSD.
As I stated above, SSD is a flash-type memory which is accessed randomly - unlike the sequential access of a traditional HDD. However, the SSDs have their own limits on life span which the manufacturers tend to downplay. Unlike the physical wear and tear of moving parts on a HDD, for an SSD "wear" happens when each time a SSD is accessed every time for writing to memory. So, SSDs are not necessarily safer despite the fact that it has no moving parts. In fact, the more the SSD is used, such as in a server environment, the shorter the life time of the drive.
So, what happens if we defrag an SSD? First off, defragmenting SSD is not necessary, since the data is placed in the memory cells and it is read from or written into by calling the address location of the memory cells. No matter where the memory cells are located, the data is accessed randomly and not sequential. Because the drive does not access memory sequentially like a spinning HDD, defragmentation will not provide an increase in access time. On the other hand, due to the loads of small write accesses, it will induce large amounts of delete - write access to the drive which will in turn decrease the life time of the SSD.
So it is better to refrain from defragmenting a Solid State Drive, since it will decrease the useful life.
Disk Defragmenter settings in Windows 7
If you use a SSD in windows 7 operating system, by default disk defragmenter will not show up the disk. Make sure do not run any third party defrag tools in your computer.
Check TRIM is enabled
In traditional hard disks when the operating system deletes a page on the SSD, at the physical block level, it is simply marked for deletion, because this is the minimum requirement to wipe out a block. When the operating system needs space, the marked pages will be grouped together into blocks and the blocks are deleted. This process will slow down the SSD.
In this case, the TRIM command goes to work. It wipe the marked pages for deletion before we actually need them. This functionality is needed for the drive to perform at its best. The TRIM command has to be supported by the operating system and the solid state drive. By default Windows 7 supports TRIM
The following command shows if TRIM is enabled.
fsutil behavior query disabledeletenotify
The command has to be run with elevated privilege in windows 7
The result of the above command is 0; TRIM is enabled, and otherwise TRIM needs to be enabled.
The following command enables TRIM
fsutil behavior set DisableDeleteNotify 0
If the above command doesn’t works, you might need to consult your hardware vendor for a firmware upgrade.