20161221

File Recovery Tips: All About Defragmentation

We sometimes hear people discussing computer fragmentation and how you should do the “defrag” regularly. What is fragmentation exactly and why are there fragments on my drives? Is it true that Solid-State Drives (SSDs) don’t need defragmentation? 



What is Fragmentation?

Fragmentation is the result of how file systems handles data. Some operating system’s file system, like NTFS and FAT32, tends to allocate contents of files in non-contiguous clusters for future in-place modification. Also, when you save your data and files, your computer finds any available space on your hard drive and stores the information. For example, the storage space of an deleted old file will be marked as available and will be overwritten by new files when needed. These separated pieces of data scattering around the drive storage medium are generally called "fragments". 

Significance of Fragmentation

File fragments can happen to hard disk drives, as well as solid-state drives. But the negative consequences on HDD are more significant due to its electromachanical nature. To read in a file, the HDD read/write head will have to search the whole disk to locate and access each and very fragment. This will take up time and energy, slowing down programs and operating system functions. 

What is Defragmentation

Defragmentation is the process of physically reorganizing files into fewer fragments. When you defrag your hard drive, you are putting these pieces back together and clearing the scattered file clusters. This process organizes and rearranges your hard drive and makes the bits of data easier for your computer to find.

The Benefits of Defragmentation

One of the biggest reasons for defragging your hard drive is faster speeds and less loading time. Programs run faster and more efficiently when the data is grouped together for easier access.

Defrag also clears up all unused space and gives you more available space for storing files. 
When you defrag your computer you not only gain increase speed but also extend the hardware lifespan. The mechanical parts of the drive have to travel less distance when the data is all in one place, thereby reducing wear and tear on the drive itself.

Is it true that SSDs don’t need to be defragged?

Common knowledge is that file system fragmentation is not an issue on SSDs, because they're so fast. What’s more, the defragmentation process will wear out the SSDs because they have finite read/write cycles. Therefore, one should never perform defrag on SSDs and should turn off the default defragmentation schedule.

This is a much debated topic. It is true that SSDs don’t suffer from the physical fragmentation like HDDs do, due to the fact that they are completely different storage media.
But every time a non-contiguous LBA range is addressed by the operating system, a new I/O command must be sent by the Operating System to the SSD. Admittedly, the fragmentation of file structure doesn’t affect SSD speed that much but overtime may as well result in negative impact on performances.

According to Microsoft employee Scott Hanselman, "Windows does sometimes defragment SSDs, yes, it's important to intelligently and appropriately defrag SSDs, and yes, Windows is smart about how it treats your SSD." He concluded that by disabling defragmentation completely you are taking a risk that your filesystem metadata could reach maximum fragmentation and get you potentially in trouble.

No comments:

Post a Comment