Recently while troubleshooting an issue on a Windows 7 PC, I noticed a number of events in the Application Log labelled "Defrag". Sparking my curiosity, I looked further and discovered that there was approximately one entry per day in the log. I looked around some more at other Windows 7 PCs and found that they too have "Defrag" entries scattered about. It turns out that Windows 7 now automatically runs a defrag on its NTFS filesystem, compared to Windows XP which never did this. This is a great idea on Microsoft's part, rather than letting things stockpile up and forcing the user to defrag while waiting for minutes or even hours while it churns away.
This got me thinking back to when I read more about other filesystems, most notably ext3 and ext4 filesystems on GNU/Linux (which are standardly used now), which never need defragmenting. Yes that's correct, they do not need to be defragmented. In fact, I've never heard of anybody regularly defragmenting ext3 or ext4 filesystems, and there are no tools to do so that I know of. The Linux System Administrator Guide states:
"Modern Linux filesystem(s) keep fragmentation at a minimum by keeping all blocks in a file close together, even if they can't be stored in consecutive sectors. Some filesystems, like ext3, effectively allocate the free block that is nearest to other blocks in a file. Therefore it is not necessary to worry about fragmentation in a Linux system."
I've mentioned this before, but it makes me wonder why Microsoft doesn't make NTFS work the same way, by allocating blocks close together in the first place, therefore eliminating the need to defragment, like ext3 and ext4 do. It's a mystery, but at least Microsoft has put on a band-aid to the fragmentation issue of NTFS. Now, if we can only get Microsoft to implement a built-in solution to cleaning up the mess of temp files that Windows and applications leave all over the place ....