Continuing on the previous Windows optimizing tip, I have promised that in this tip I will discuss about defragmentation and defragmenters.
So, today's WinPowerTip will attempt to answer the following questions: What is defragmentation? Do I need to defragment the NTFS filesystem? Which defragmenter is a good one? How to defragment properly?
And of course, a golden question: Will I damage my hard disk prematurely if I defrag regularly?
Find the answers to the above questions after the jump ![]()
Follow up:
What is defragmentation?
Before answering this question, we must first understand what fragmentation is: Fragmentation is the condition where files in the hard disk are stored as non-contiguous pieces.
Not clear enough? Then see the following illustration:
![]()
(taken from Wikipedia: http://en.wikipedia.org/wiki/File_system_fragmentation )
Condition (1) shows a hard disk that has just been formatted, and files are starting to be written on it. We see that all files are arranged neatly, and there are some free space behind all the files.
Conditon (2) happens after file "B" is deleted. There's an empty space gap between files "A" and "C".
Condition (3) happens after a new file "F" is created. Windows will seek for the first space that can hold this file "F" in its entirety, and thus inserts "F" in the gap between "A" and "C". Note that "F" does not completely fill the gap between "A" and "C".
Condition (4) happens after yet another file "G" is created. Again, Windows will seek for the first empty space that can hold "G"... and as it happens, the gap between "F" and "C" fits exactly! So, Windows inserts "G" between "F" and "C".
Condition (5) happens after the user edits file "F", and adds new information into "F". Because there is no more empty space after "F", Windows is forced to seek the next empty space... which happens to be at the end of the hard disk, behind all the files. So, the 'continuation' (or, in Winodws parlance, next extent) of "F" is forced to be placed faaaaaar away from the beginning of "F".
Thusly file "F" becomes fragmented.
And don't forget: The same fragmentation may befell files "A", "G", "C", "D", dan "E" (because the empty space after "E" at this moment has been occupied by the 2nd extent of "F").
What's the drawback of fragmentation?
Because the file is broken into 2 (or more) extents, the read/write process to the broken file will be slower, much slower than the read/write process to a contiguous file. This happens because Windows, in attempting to read/write to the file, is forced to shift the hard disk's head around everytime Windows finishes reading one extent and needs to read the next extent.
But the drawback does not stop at slow read/write.
Because the head must constantly skip around, there's a real possibility that your hard disk's life is shortened! Or, in simpler terms: Your hard disk may be damaged prematurely.
Diskeeper Corporation provided several informatice white papers about the effects of fragmentation (albeit slightly biased):
- http://files.diskeeper.com/pdf/ImpactofDiskFragmentation.pdf
- http://files.diskeeper.com/pdf/Effects_of_Fragmentation_on_Reliability.doc
- http://www.diskeeper.com/whats-new/whitepaper.asp
So, what is defragmentation?
Defragmentation is the process, an attempt to re-arrange the files in the hard disk to remove fragmentation; or if it is not possible, at least reduce it to as few as possible.
In the above case, defragmentation may be performed by shifting "G" to the back, and joining the 2nd extent of "F" to the beginning. Or, the 1st and 2nd extent of "F" can be united in the back of the disk. Or "C" is moved to the back, "G" is shifted back a little, then the 2nd extent of "F" is appended to the 1st. Or . . . ![]()
As you can see, there are a lot of ways defragmentation can be performed. Some are unnecessarily complex, some are laughingly simple. Here's where various Disk Defragmenters differ.
Now, I hear some of you clamoring: Isn't NTFS of the Windows NT Family designed to do away with fragmentation? Well, see the next page for the answer . . .
Indonesia
Recent Comments