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

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.


Solution 1:

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.

Solution 2:

Try rebooting into Safe mode, and then turn off as many services as possible. Open files will not moved or defraged, so the idea to to run with as few processes as possible.

Or remove the drive, and install it (as a data drive) on another PC for defraging.