Posted by
Fragmentation deals with hard drives, more specifically the filesystem on hard drives. Almost all filesystems fragment, but some are better than others. But what exactly is fragmentation? Hard drives are composed of platters of magnetic media ( think of an old LP record) The files take up a block of space , if there is free space on the drive , the block are contiguous with each other. Perhaps a visual explanation would help here. And this is a basic explanation of the internals of a file system.
Imagine that we have 4 files, I will label them 1 through 4, 0 will be free space.
blank space 00000000000000000000000000000000000000000
allocated files 111111112222222222223334444444400000000000
As you can see some of the files are bigger than others ( more numbers), and you can also see that they are back to back, but lets say that you no longer need file #3 and delete it. It will now look like this :
allocated files 111111112222222222220004444444400000000000
The file #3 is now gone* , but there is a hole in the file system. Next time you write a file, lets call call it file 5 it will start from the first free spot on the system and continue to the next free spot and the next. So it will now look like this :
allocated files 111111112222222222225554444444455555000000
Now when the hard drive tries to read the file off the disk( let us say #5 ), it will start at 5, then skip over the 4th file and continue reading the file. This is a very basic explanation , but this is something on most filesystem happens all the time. Computers create alot of temporary files , which get deleted al the time. You can imagine that this can heavily fragment your system. These days the filesystems are alot better than than before, and they try to minimize the fragmentation of the filesystem, but it still does happen.
The reason that this is bad is because it causes the moving heads ( the part of the hard drive that actually reads the data, again think of your pickup head on a turntable) to have to move back and forth across the hard drive to find your files. The less fragmentation the drive has, the faster the data will be read and the less the drive will thrash about.
There are programs to get your file system back in tip top shape, and they really don’t need to be run more than once a month. Depending on the OS, I have a few links below that will help.
Windows – NTFS, fat, fat32 Windows comes with a built in defragmentation tool which is decent. ( right click my computer , goto tools, defragment) Windows filesystems fragment really easily, you can use the built in one or : http://www.diskeeper.com/
OSX – HFS and HFS Plus filesystem try to keep fragmentation low, but when it happens you can use:
http://www.coriolis-systems.com/iDefrag.php
Linux – ext2,3 filesystem manage fragmentation really well, but when they do become fragmented you can use : e2defrag , shake for ext3. In linux you will most likely never need these.
In closing, let me say that this is a basic run down of how fragmentation and defragmentation of drives and file systems.
* There is alot more that goes on when you delete a file, but that is for another article.
So - what do you think? Please share your comments in the section below.
Your email is never published or shared with anyone.
The following comments are owned by whoever posted them. NYC Tech Guys is not responsible for them in any way.