Do I Really Need to Defrag My Linux PC?
I am using Linux operating system on my PC for long time now. Most of the Linux users still carry lot of doubts in their mind. Last week one of my friend asked me, why doesn’t Linux need defragmenting? I gave him detailed explanation, if you have the same doubt as my friend then keep reading this article. I hope this article will clear your doubts about why doesn’t Linux need defragmenting.
You might have noticed that Linux doesn’t comes with disk defragmenting utilities unlike Windows. Do you know the reason behind that? To get a fair idea about why Linux doesn’t require defragmenting and Windows does, you will have to know how Linux and Windows handle fragmentation differently. Many users find it hard to understand why you need to defragment file systems to speed up the computer in Windows. Generally, a hard drive has numerous sectors on it, and each of which contains information. And in actual, large files are stored across different number of sectors.
Consider that you are saving different files onto your file system. All of these files are stored in a contiguous cluster of sectors. And later on when you update one of the file, which increased the file size. In these situations the file system will try to store these newly added parts to files next to source file but as it is already occupied, the file has to be split into pieces. So whenever the file has to be read the head will have to skip to different physical locations on the hard drive, which slows down the process.
It is the process which will move the bits of files from one physical location to the other to ensure that each file is contiguously stored in the drive. Windows users will have to do defragmentation process to improve the performance of the system. In the updated versions of Windows this task is performed automatically. Now let us compare how Windows and Linux file systems work
“Do I Really Need to Defrag My PC?”
Windows File Systems:
Let’s study this by considering two main file Windows file system the older and newer version i.e. FAT and NTFS.
FAT: The files saved in FAT file system lie closer to the start of the disk. When the user saves a second file to it, this will get stored next to the first file and likewise. So if the original source file grow in size this will get fragmented as there is no room for it.
NTFS: NTFS has mad much more room for the files by allocating buffer free space to the files but still overtime the files will get fragmented.
To improve the performance of the system user will have to defragment the drive, this issue is sorted out to an extent by bringing in the automatic defragmentation process running in the background on its latest versions
Linux File Systems:
Linux file systems such as ext2, ext3, ext4, etc. allocates the files in a much more brilliant way. It places the files by scattering it over the disk, which leaves huge amount of space in between. So, when a file is modified and even if it grows big, there is enough free space to occupy it. And in case if fragmentation occurs, then the file system will try to move the files to reduce the fragmentation. Hence there is no need for defragmentation utility and that explains, why doesn’t Linux need defragmenting?