Like our Facebook Page!

Pages

Thursday, February 19, 2015

Widgets

Dhunkaraahaa Explains What Disk Defragmentation is

Many of us know know we have to defragment our disks daily to keep the computer healthy and fast. But, what most of us don't know is what is disk fragmentation and what actually happens in disk defragmentation process.

In fact it's really simple once you get it. In in post Dhunkaraahaa will try to explain what disk fragmentation (defragmentation) is exactly in a way which we hope would be easy to understand.


Before beginning I would like to thank Roberto Di Cosmo for coming up with this wonderful comparison which would help you to understand the process easily.

Getting the Basic Idea

First of all imagine your hard drive as a VERY BIG file cabinet (hard disk or partition) with MILLIONS of drawers (cluster size or allocation unit size). all drawers are of the same size and hold only a certain amount of data. Now of course, some larger files will need to be split into several drawers, and some very large files would need thousands of drawers. Undoubtedly the files would be much easier to find if the drawers they occupy are close to each other.

We don't have time to take care of this ourselves so we are going to hire a person for the job. By 'job' I mean taking out useless files (deleted files), organizing the files in drawers, putting new files and most importantly retrieving the wanted file quickly.

We announced for the job and two people applied for this job; a Windows guy and a Linux guy. In the next section we'll see how both guys work and the differences of their work style.

The Windows Guy

We hired the Windows guy for the job.He just empties the drawers when the file is removed and when a new file comes, he splits the file into size of drawers and stuffs each part randomly into the first available empty drawer.

So after a few weeks the file cabinet might look like as in the picture below. Each square representing a drawer.

Windows


At this point we found it almost impossible to find some files since parts of the file are randomly tossed into drawers here and there. This was too much to take! We filed a complaint to the Windows guy about this and his reply was far more horrifying. He advices us to hire a boy (Disk defragmentation software) every weekend to organize the drawers.

Now this boy; we hired for a few weeks and he did the job well. But it took time and was hard work. This extra staff will mean extra salary. So we decided to hire the second applicant for the job (the Linux guy). Just to see how he does the job.

The Linux Guy

So we hired the Linux guy. Now, what he does is he keeps track of all contiguous empty drawers in his laptop's database. When a new file arrives, he searches his database for the longest row/column of contiguous empty drawers enough to fit the file in and put's the parts of the file there. So after a few weeks of activity the cabinet is kept clean.

The image below represents how the file cabinet looked after several weeks after Linux guy's job.

Linux

Obviously it was much easier to find specific files when Linux guy started to manage the file cabinet. And of course no boy had to be hired every weekend to tidy up the file cabinet.

Summary

So now we've understood that operating systems store files in the hard disk split into a specific size. The hard disk has clusters of certain size and the files are stored this way. You'll see an option to select Allocation unit size when formatting a partition or USB drive. This is the size of the clusters used in that partition or USB drive.

We have also seen that windows carelessly throws the files into random clusters. Furthermore the speed at which a file can be retrieved depends upon how close the clusters used by the file are from each other.

So in summary:-
  • The more you use Linux, the faster it gets to read files and the faster the system gets.
  • The more you use Windows, the slower it gets to read files and the slower the system gets.
 It's no doubt, linux wins here!

Concluding the post, I would like to take note that I tried very hard to make this article informative as well as enjoyable to read at the same time. If you found this article informative and easy to understand, please share and let other's into the knowledge too.

Additionally, if there is any part of the article you did not understand, or have a question in mind, leave it in the comments and I'll reply you. Ciao!

SHARE THIS POST   

  • Facebook
  • Twitter
  • Myspace
  • Google Buzz
  • Reddit
  • Stumnleupon
  • Delicious
  • Digg
Author: Hussain Noor Mohamed
Noor is a Maldivian who always had a great interest in computer stuff and is the founder of Dhunkaraahaa Blog. Read More →

1 comment:

  1. Dhunkaraahaa Explains What Disk Defragmentation Is >>>>> Download Now

    >>>>> Download Full

    Dhunkaraahaa Explains What Disk Defragmentation Is >>>>> Download LINK

    >>>>> Download Now

    Dhunkaraahaa Explains What Disk Defragmentation Is >>>>> Download Full

    >>>>> Download LINK

    ReplyDelete