Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question
15% is not a hard limit, just a rough estimate. – grawity Sep 9 '11 at 22:31
It's possible that the fragments are just big enough to where the cost of moving them together is equal to or greater than the benefit of moving them together. – surfasb Sep 9 '11 at 23:42
Are the large undefragmentable files by any chance open? Can you mention some of the really-fragmented large ones? – William C Sep 10 '11 at 0:24
@William C: those are users personal files (including those of not logged in users). They aren't used during defragmentation. – MainMa Sep 10 '11 at 9:56
up vote 4 down vote accepted

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.

share|improve this answer

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.

share|improve this answer

You can disable hibernation and it should delete the hiberfil.sys. If not, you can manually delete it once hibernation is disabled. You can also disable your pagefile. Once those two large, undefragmentable files are gone, you might have better results defragmenting. Once, thats done you can reenable the pagefile and hibernation. Hopefully, after the volume is defragmented, the two other files will be placed in contiguous files.

share|improve this answer

Sysinternals has the Defrag Page File utility. I'm not sure how it'll work with the disk being arranged as it is, but it's probably worth a try to get those bigger files arranged and out of the away so that your standard defrag can more effectively get at the other files.

share|improve this answer

If defragging in safe mode doesn't help, then either

  • Empty your prefetch and superfetch folders. (Shudder!) These folders tell Defrag not to defragment certain files, which is the exact opposite of what you want,


  • Remove the drive and defrag it whilst connected to another computer. This makes sure that open files are as few as possible and that Defrag doesn't consider your PF data.
share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .