Home » Questions » Computers [ Ask a new question ]

Windows XP - File Fragmentation, what is it and why does it occur?

Windows XP - File Fragmentation, what is it and why does it occur?

I'm an XP user and I've always wondered why files become "fragmented", and why you don't have to deal with defragmenting the hard drive in Linux? Is it something that's Windows-specific or do Linux users have to deal with this problem too?

Asked by: Guest | Views: 63
Total answers/comments: 1
Guest [Entry]

"It's due to how the filesystem is implemented. While you COULD store each byte of your million byte long document on the drive, one, by one, this is obviously horribly inefficient (keep in mind that you need to book keep these bytes.)

So most filesystem work with the concept of ""blocks"", say 4 kilobytes. So if you have a document taking up 10 kilobytes, it will take up 3 blocks. The last block will only be half-full (you can see this under file properties in Windows. Compare ""size"" versus ""size on disk"").

If you later on add to this document, and the following block (that would be the 3th block) is taken up by something else, the filesystem must find this last 1 block elsewhere. This is fragmentation. The document, takes up 4 blocks, but only the first 3 are consecutive on disk. The 4th is located elsewhere. And this can lead to degraded performance.

Now, this is the ""classic"" explanation to your question. There are many file systems, and they solve this issue in many varied ways."