What is Fragmentation?
Example: we have a file that we save on a disk. Every time we edit that file, the sizes increases or decreases. The data from it must be stored somewhere on the disk. If the disk is empty and no other data has been written to it, then the file will be saved as a contiguous file. Otherwise it will be saved in the next free space it finds available. The process is called fragmentation.
Performance and Life?
The HDD uses a magnetic arm called an actuator that reads the contents of the disk. The movement is done by a very powerful magnet that helps move the arm by switching polarities.
Now, based on this, movement is critical. If the HDD is fragmented it will cause the arm to move back and forth many times in order to open a file. The file in this case does not matter; whether it is a huge file (like a video file) or a small file (document), the time required for reading it is increased.
Whether or not a defragmenter is used, the same can be achieved without it by simply performing a format thus making all space contiguous.
Defragmenter steps are:
- directory consolidation
- file consolidation
Manual defrag:
- move all files from the partition/drive
- format the empty drive
- perform a restart*
- recreate the directorial structure
- copy all files back to their original dirs
Why directories first?
The first HDD category must be the rarest to be changed.
The order is: less frequent --> middle --> high frequent
Basically the files you work with should the last to enter the disk.
This is why windows boot loader is always copied first on install or has it's own partition (as wee see in vista, 7 and 8).
* The restart is necessery to reset the HDD next-free-space pointer. For example: you defragment a drive but the HDD will save the file where it was left off (most likely in the middle of the disk) even though the disk was already defragmented. Only a restart will reset the pointer.
Defragmenters
Choose them wisely. Don' be like 'ooh it hs pretty colors and is made by a big shot corporation. it mut be good!'. Wrong: the best defragmenter is one the performes the above steps. It must create categories and with gaps between them for use as an extended space in order to overcome fragmentation.
Defragging frequency
Contrary to popular belief, you shouldn't defragment more than once every few months. The disk overhead generated by a defrag will shorten the disk's life by wearing it out and the performance gained will not be noticeable.
A manual defrag would be best if you are defragmenting a drive filled with data (videos/documents/music etc.). It is faster and more efficient than a defrag. Also causes less overhead.
Bookmarks