Why does MyDefrag take so long to Fast Optimize?

2

From recommendations in other questions about defragmenters, I decided to try out MyDefrag. However I'm finding that the Fast Optimize script is running very slowly, specifically it seems to take a very long time over "Reclaiming the NTFS reserved areas" - and the interface implies that this is related to one of my Virtual PC vhd files.

By a long time I mean it's got to 0.0659% after about 5 hours of running. Is this normal, or is there something I can do to improve this.

EDIT: I tried a number of the suggestions posted by Ivo to no avail. I then moved the VHD file that it was stuck on off the disk and it's now running through much quicker. To compare it ran through phase 1 in about 10 minutes, compared to taking 5 hours to get to less than 0.1% of phase 1

Which still makes me wonder why a VHD file was in an "NTFS reserved area", as reserved implies to me that user files shouldn't be there.

Sliff

Posted 2009-07-22T14:30:07.047

Reputation: 1 297

Answers

1

It did appear to be the vhd file that was causing the issue, having moved it off, performed a defrag and then returned it, all subsequent defrags have had no issues.

Sliff

Posted 2009-07-22T14:30:07.047

Reputation: 1 297

1

Perhaps try the older version JKDefrag and see how that one does?

Or else, is there some application running that might interfere with defragmentation?

Not a real solution, but my suggestion would be to just let it run overnight or as a screensaver. Give it time and it will fix (what it can) eventually.

From the MYDefrag FAQ:

The FastOptimize and FastUpdate scripts will try to perfectly fill gaps with files from above the gap, but if MyDefrag cannot find a perfect fitting combination of files then a (smaller) gap will be left unfilled. The SlowOptimize script will produce cleaner results, but will take more time to finish.

There are many files that cannot be moved while Windows is running, because they are in use by an application, or by a service, or by Windows itself. See the "c:\Program Files\MyDefrag v4.1\MyDefrag.log" file for a list of files that could not be moved. The unmovables can be anywhere on disk and are usually fragmented into microscopically small segments. In other words, the harddisk is not a big block of space where files can be moved at will, but thousands of little blocks bounded by unmovable data. Tip: Certain unmovable Windows files cannot be defragmented, but there are things you can do. For more information see the FAQ Special files

Defragmentation and optimization can take a long time, you will have to be patient. In the top of the window you will see the current MyDefrag activity and normally the program will be moving files at a furious rate, dozens of small files per second. The display is only refreshed once per second though, and big files will take more time, obviously.

  • If your computer becomes unresponsive while running MyDefrag (especially the MyDefrag display) then try the Slowdown setting to make MyDefrag use less resources. Note: It is normal for your computer to be unresponsive while the $MFT is being moved. This is caused by something inside Windows itself, not MyDefrag.
  • Try turning off your virusscanner. Some virusscanners get exited and scan all the files that MyDefrag is moving, even though MyDefrag does not execute or change the files.
  • Try a reboot. Sometimes the Microsoft defragmentation API can become mysteriously slow and take a minute to move even a small file. I don't know why, but usually a reboot helps.
  • Cleanup old stuff from your harddisk. MyDefrag can move files more efficiently if there is plenty of free space available.

It is impossible to predict how much running time a script will take. It depends on things such as the optimization you have selected, the speed of your harddisk, how big the files are, how much data is on the disk, how the files are currently placed, and more. Assuming a harddisk speed of 40 megabytes per second, then reading 100 gigabytes of data will take 100000 / 40 = 2500 seconds (42 minutes). But MyDefrag has to do a lot more than just read the data, it also has to write the data, and update the MFT/FAT. And it may have to move data out of the way before it can place an item were it want's it to be. MyDefrag will do things as efficiently as possible, with as little data movement as possible, but it will take a long time nonetheless. If you are concerned about speed then use the "Fast Optimize" script. It will produce very good results in a minimum amount of time, especially if you use it every day.

Tip: For more information about what the program is doing run it with the "-d 4" commandline parameter, or add a line with "Debug(175)" to your "C:\Program Files\MyDefrag v4.1\Scripts\Settings.MyD" script, and while the program is running look at your "C:\Program Files\MyDefrag v4.1\MyDefrag.debuglog" file.

Ivo Flipse

Posted 2009-07-22T14:30:07.047

Reputation: 24 054

MyDefrag is nice, but there's really little reason to move from JKDefrag. – Phoshi – 2009-10-13T08:58:57.147

I'll second JkDefrag any day. Yet to check 4.0 – nik – 2009-07-22T14:37:28.880

So in other words, that means there's a lot of files that needs defragging :) – Isxek – 2009-07-22T16:13:19.167

0

I recommend disabling optimization for virtual disks. It's simple to edit the MyDefrag scripts not to optimize specified directories, for example, where your virtual disk is.

I use VirtualBox and found problems getting it to recognize virtual disks after they'd been optimized by the host OS using MyDefrag. I also read elsewhere, sorry I don't have the reference, that virtual disk optimization in the host OS is not a good idea. The recommended approach was to optimize the Virtual Disk within the guest OS.

edwinbradford

Posted 2009-07-22T14:30:07.047

Reputation: 131