Technology in terms you understand. Sign up for the Confident Computing newsletter for weekly solutions to make your life easier. Click here and get The Ask Leo! Guide to Staying Safe on the Internet — FREE Edition as my thank you for subscribing!

Why would the defragger tell me I still need to defrag after it's done?

When I defrag and then analyze, defragmenter tells me over and over
again that I need to defrag? Why would it do that?

I’m assuming what you mean is that you’ve defragged, and then
immediately thereafter run the analysis again only to have it tell you
that “this volume should be defragmented”, even though that’s exactly
what you’ve just done.

I can think of a couple of reasons.

Become a Patron of Ask Leo! and go ad-free!

The first reason is simply lack of disk space.

Defragging typically works simply by moving files around on your
disk. In a nutshell, if a file is physically spread out in 15 different
places on the hard disk, the defragger just looks for a large unused
space on the disk that’s big enough to hold the entire file, and moves
it there. Repeat that over and over again for all the files on your
hard disk, and you’re defragged.

Now, naturally, that’s an over simplification. For example, the
defragger can also make choices on which files to move around first, so
that it can create bigger contiguous unused spaces for the bigger
fragmented files. The defragger may also take into account the physical
location of files on the disk and not just make the files contiguous,
but move them all so that they’re near each other, which means that the
disk doesn’t need to work as hard when it moves from one file to the
next.

“Defragging typically works simply by moving
files around on your disk.”

But ultimately defragging boils down to copying fragmented files
into areas of the disk that are big enough to hold the entire file
without fragmenting it.

So, what if you have a file on your hard disk that is fragmented but
there’s not enough contiguous free space on the disk to make a copy of
it? (And remember, it’s not just about free space, it’s about free space
that is contiguous; free space that has unfragmented portions
that are large enough to hold the file in question.)

That file can’t be defragged.

And if you have a lot of files that can’t be defragged?

It’ll look like your hard disk still needs defragging, even after
the defragging tool made its best effort to do so.

The second reason is really very much like the first, with the added
complexity of files that cannot be defragged by normal defragging
tools.

In particular, your Windows paging or swap file cannot be defragged
by the Windows defragger, nor can the system registry files. That means
that if over time as these have grown they become fragmented, they will
contribute to what the defragger sees as the “need” for defragging, but
they cannot be part of the solution since they can’t be defragged.

So, what can you do?

To state the obvious: free up some disk space and try again. Try
emptying your browser cache, or even looking into what’s taking up
space
and making decisions to move, archive or delete data to make
more room.

Typically, with more room, a defrag will be much happier.

And in all honesty, doing nothing is also an option. Even though
your defragger might report that your drive should still be defragged,
if you’ve just done so then there’s nothing wrong with ignoring the
second report. Technically you might suffer a minor performance loss,
but in most cases the loss isn’t noticeable in the least, and the
effort of cleaning up and getting the defragger to stop complaining
simply isn’t worth it.

And a third option is to use a different defragging tool. There’s
definitely some magic involved in the approaches to defragging, and
some tools do a much better job of defragging in a low-space situation.
But as you might guess, this is also something I don’t consider to be
worth the expense to address.

And finally, specifically for those system files that can’t be
defragged by “normal” defragging tools, look into PageDefrag, a free tool from
Microsoft and Sysinternals that will defrag those files on reboot,
before Windows has been loaded.

Subscribe to Confident Computing! Tech problem solving & safety tips & a weekly confidence boost in your inbox every week.

I'll see you there!

10 Reasons Your Computer is Slow

Slow Computer?

Speed up with my special report: 10 Reasons Your Computer is Slow, now updated for Windows 10.

NOW: name your own price! You decide how much to pay -- and yes, that means you can get this report completely free if you so choose. Get your copy now!

6 comments on “Why would the defragger tell me I still need to defrag after it's done?”

  1. Regarding third party utilities; here’s my experience from a few weeks ago:
    I used to get the ‘Some files on this volume could not defragmented’ message on my XP gaming rig. Turns out the MFT and pagefile were heavily fragmented and the drive was about 80% full.

    Tried most of the free defraggers like auslogics, jkdefragger, defraggler etc, and end result: none of them could do anything about the MFT which is a critical system file. Downloaded Diskeeper 2008’s free trial version (ended up buying it later because it was so good) and it was able to defrag the whole drive and then the MFT and pagefile via a boot-time defrag without breaking into a sweat. It was also the only one that allowed me to multitask without a hitch while running in the background. So, if system files are fragmented, it’s better to go directly to the trial version of Diskeeper and fix the problem rather than wasting time with the ‘free’ utilities. Atleast you can use Diskeeper for 30 days for free legally.

    Reply
  2. I’ve been curious about this defragging problem on one of my computers for a long time – turns out it was a fragmented pagefile. Thanks for the solution, the little program worked perfectly.

    Reply
  3. PerfectDisk will do the same things as Disk Keeper. Diskkeeper seemes a bit too complicated to use. Some people us the “set and forget” option and sleep well.

    Reply
  4. The new defragmenting programs aren’t like the one that came with DOS 6.x which only needed a single free cluster to completely defrag a disk and it would do it ever so slowly and the only thing it couldn’t defrag was the windows permanent swapfile;

    there’s a free utility for defragmenting the pagefile & registry etc. files called PageDefrag from sysinternals on the MS website
    it’s a stand alone program that doesn’t install but just sets the “run once” flag and just defrags the pagefile and registry files @ boot

    PageDefrag works on Windows NT 4.0, Windows 2000, Windows XP, and Server 2003

    PageDefrag isn’t for general drive defragmenting but is an additional companion tool for a regular defrag program.

    PageDefrag is mentioned (and linked to) in the article you’re commenting on.

    – Leo
    16-Oct-2008
    Reply
  5. There are 2 gotchas with the windows XP defrag:
    1) Doesn’t deal with pagefiles or MFT
    2) requires multiple passes to completely defrag what can be defragged.

    Both of these gotchas come from the fact that XP’s defragger is actually a very scaled down version of DiskKeeper. If it was a full scale version, there would be no reason for you to buy the full version. Help, About Disk Defragmenter will show:
    Disk Defragmenter
    Microsoft Corp, Executive Software Int’l
    Version: 1.0

    Executive Software produces DiskKeeper.

    If you have enough memory, you can set the page file to No Paging File, reboot, defrag, then set it to a custom size and reboot one more time. I use 2047 for both numbers, anything at 2GB or above seems to slow things down a tiny bit. By forcing a single size, the page file won’t grow, and therefore won’t fragment. If you have more than one hard drive, multiple page files can speed things up. Put a 1024 on C and a 1024 on D, and XP will try to use the pagefile on the least used drive, thus speeding things up a bit.

    Reply
  6. PageDefrag, from Sysinternals, doesn’t work on 64 bit systems. However, if your PC is loaded enough to warrant it, you can erase (not just disable) the pagefile, then defrag. It’s probably more hassle than it’s worth.

    Reply

Leave a reply:

Before commenting please:

  • Read the article.
  • Comment on the article.
  • No personal information.
  • No spam.

Comments violating those rules will be removed. Comments that don't add value will be removed, including off-topic or content-free comments, or comments that look even a little bit like spam. All comments containing links and certain keywords will be moderated before publication.

I want comments to be valuable for everyone, including those who come later and take the time to read.