Windows – Why does Windows Defragmenter do nearly nothing on a disk with 23% empty space

defragmenthard drivewindowswindows xp

While trying to defragment a 80 GB NTFS (4 KB cluster size) volume on Windows XP, I encountered a strange problem: the defragmentation process is very quick, but also very useless. Graphically, I could see some files moving all around, but the fragmentation level remains the same.

Here's what it looks like after the volume has been defragmented:

The picture is a screenshot of Windows Defragmenter on Windows XP, with two graphical views of a disk: before and after; both are quite similar, and present a heavy defragmentation

I know there is a 15% free space limit. Actually, the volume is free at 23%.

Of course, Windows Defragmenter shows a bunch of files it was unable to defragment. Some are large (up to 1 GB), but not too large to be unable to move them during defragmentation. Not counting, I imagine, hiberfil.sys and pagefile.sys (they are immovable, aren't they?).

How do I diagnose this issue?

PS. Installing other defragmentation software products, as suggested on a similar question, is not a solution in my case.

Best Answer

The defragmenter does not have anywhere to move the big files to: all free space is somewhat evenly distributed in small chunks, so there wouldn't be any improvement if $VERYBIGFILE changed from, say, 20 close pieces to 10 scattered-all-over pieces.

One of the steps done by the defragmenter is file compaction, in which contiguous but separate files are shuffled around to form a single block of data. Try running this a few times, and it should get better over time.

You can also try contig -v somebigfile to defragment files one by one.

Related Question