Started 2 months ago | Discussions thread
Sean Nelson
Sean Nelson Forum Pro • Posts: 13,743
Re: not that important

AnthonyL wrote:

I came to the conclusion years ago that defragging a drive meant that the next bit of data file size change, such as a database or a Word document, had nowhere to go other than to somewhere that would create more defragmentation. A really clever defragger would leave gaps in the best places for file growth, if of course it knew what file growth to expect.

That's a lot harder than it sounds, because most consumer software tends to modify files by reading them into memory, making a change, writing the changes out to a brand new file, and then deleting the old file. So you end up with an isolated chunk of free space where the old file used to be, and the new file will be fragmented if there isn't a large enough chunk of contiguous free space to store it in.

As a result, defraggers work by trying to move all of the used file blocks together so as to create the biggest possible chunks of contiguous free space, which is a lot more effective than leaving little free chunks after all of your data files, since most of those data files would never be extended.

Databases are the exception, but most database software deals with this by pre-extending the file so that there's room to add new data without having to allocate new space in the file system. This means you get fewer relatively big chunks of file rather than a lot more smaller ones.

Keyboard shortcuts:
FForum PPrevious NNext WNext unread UUpvote SSubscribe RReply QQuote BBookmark MMy threads
Color scheme? Blue / Yellow