Defragmenting the hard drive

I subscribe to a PC magazine (not as useful as Windows Secrets) but this month the free cover DVD stuffed with programs I don't generally want included O&O's defrag program. So my question is, is there any benefit in using a separate defrag program.

If you're using Windows 7, not too much; that said, I keep a couple on hand, in case the disk gets stubborn or I want to "optimize" the disk order. At the moment, I have Auslogics, Defraggler and Smart Defrag 2, but that's overkill. I wouldn't cry if I lost them, however, but they're nice to have if you've got the room. Make sure they're not set to run automatically, though, or at least , not too frequently; defragging isn't as much of a necessity for disk maintenance as it once was.

I use MyDefrag and have replaced the Task Scheduler entries for the Windows defragger with tailored scripts for MyDefrag. It works just fine for me.

Create a fresh drive image before making system changes, in case you need to start over!

"The problem is not the problem. The problem is your attitude about the problem. Savvy?"—Captain Jack Sparrow "When you're troubleshooting, start with the simple and proceed to the complex."—M.O. Johns "Experience is what you get when you're looking for something else."—Sir Thomas Robert Deware. Unleash Windows

I use Piriform Defraggler..
It also has a hard drive health button and it's free.

I very rarely defrag.

Funny, the drives where I keep my images are always in need of defragging but I replace the image every week.
I once read that you shouldn't defrag a drive that has an image on it...
How factual that is I have no idea.

@Roderunner:
There is a bit of disinformation in the How To Geek article: "Another factor are the giant hard drives in modern computers, which have enough free space that Windows doesn’t have to fragment your files in order to write them to the drive."

Maybe Windows doesn't have to fragment your files on a huge drive, but it does, anyway. I've seen fragmentation on every Windows 7 machine I've looked into.

@Banyarola:
Whether or not an image file should be defragmented depends entirely on the software that created the image file. I use TeraByte drive imaging (part of BootIt Bare Metal) and routinely defrag my image files with no ill effects whatsoever. However, I have read a number of posts on various boards to the effect that some image files created by other software become unusable after defragmenting.

As for the default defrag scheduling in Windows 7, if one turns the computer off routinely, it probably hasn't been defragged at all. The default schedule is for 1:00 am once weekly. As I posted previously, I have replaced the default defragger with MyDefrag in the Task Scheduler, and I never turn my desktop off, so the only time I do a manual defrag is when I plug in my eSATA backup drive and defrag my image files after making fresh drive images.

Create a fresh drive image before making system changes, in case you need to start over!

"The problem is not the problem. The problem is your attitude about the problem. Savvy?"—Captain Jack Sparrow "When you're troubleshooting, start with the simple and proceed to the complex."—M.O. Johns "Experience is what you get when you're looking for something else."—Sir Thomas Robert Deware. Unleash Windows

[FONT=georgia][SIZE=2]
@Roderunner:
There is a bit of disinformation in the How To Geek article: "Another factor are the giant hard drives in modern computers, which have enough free space that Windows doesn’t have to fragment your files in order to write them to the drive."

Maybe so, but I didn't write it. I use Auslogics very rarely for my hdd's but do analyse more often.

I subscribe to a PC magazine (not as useful as Windows Secrets) but this month the free cover DVD stuffed with programs I don't generally want included O&O's defrag program. So my question is, is there any benefit in using a separate defrag program.

Peter

There is increasingly no need for a 3rd party defrag program as hardware and operating systems have improved
considerably to contribute to minimizing the actual need. A small degree of fragmentation never hurts and will not reduce performance noticably.
The Windows 7 default utility is sufficient in most circumstances.

SSD's don't require defragmenting, and other internal mechanical drives seldom need defragmenting on the order that was done even a few years ago.
Third party defrag tools are not worth paying out for, especially since there are some decent free ones, as mentioned above.

The defrag program that comes with Windows xx has always been the safest Defrag program.
And it's 100% FREE.

I tried the Defraggler once, and my hard drive was toast. I had to do a Ghost Image Restore to put things right again
and get my PC to boot.
That is one very DANGEROUS program.

Then there's the Auslogic defrag program. I used that just once and then I examined my C: drive. There were files
scattered from one end of the drive to the other. What a mess! Again, I had to resort to a Ghost Image Restore to
put things right again.

If you have a good Backup program that you've tested and rely on, (for backup and restore) then do a backup of C: and follow that immediately with a Restore. The entire C: drive will be re-written and everything will be in perfect order. I have to qualify that,
statement. I only use Ghost 2003 or Ghost 11.5 to backup my drive. It adds files to the backup one by one as they
appear in the drives directory. Certain files like the Pagefile, are NOT copied.
So when a restore is performed, the files are re-written to the HD in perfect order, with no spaces between them and
of course, NO Fragmentation.

* Other backup programs, the bit copiers, would probably not do that good a job of defragmenting. Eh?

That Backup + Restore technique is the same one I used on the big Mainframe computer I ran back in the early 90's.

If you have absolutely no fragmentation on the drive, then the hundreds of temporary files that are created over the course of a Windows session will all be written at the end of the drive, which cannot avoid some deterioration of disk read/write performance simply by increasing head travel. Not wise.

A more useful algorithm is one that allows free space in a number of zones across the used portions of a drive so that the temporary files won't have to queue up at the very end to find any free space.

Most defraggers (not all, but most) simply use the Windows defrag API to say "move file xxxxxxxx.xxx from here to there". The Windows defragger does the actual work. The only real differences are in the algorithms used.

If one creates a true drive image (bit for bit reproduction) and then performs a restore of that image, it will restore the drive to the exact condition of fragmentation that it was in at the time the drive image was made.

Create a fresh drive image before making system changes, in case you need to start over!

"The problem is not the problem. The problem is your attitude about the problem. Savvy?"—Captain Jack Sparrow "When you're troubleshooting, start with the simple and proceed to the complex."—M.O. Johns "Experience is what you get when you're looking for something else."—Sir Thomas Robert Deware. Unleash Windows

It's not often appreciated that defragmentation consists of two aspects:

1. Consolidate each fragmented file into contiguous segments rather than each being spread across two or more non-contiguous segments; to maintain file continuity;

2. Consolidate all unused segments so that there are no gaps, aka the free space checker-boarding effect.

So in a fully defragmented state a disk would consist of just two parts - a continuous band of space occupied by all the current files followed by a continuous band of available space.

There are now some provisos that come into play when a defrag is carried out - e.g. files that are locked or in use when the defrag takes place, files that are designated system files and cannot be moved. What happens in practice is that doing both 1 and 2 on a large partition can take a very significant amount of time. So many defragmenting applications provide for a quick defrag that involves only 1.

So what happens when you run an image backup and then restore it - what is the affect on file fragmentation? That's a very good question and there is no definitive answer because it very much depends on the software you use. So we would have to ask the authors of the defrag software just what they do in these circumstances. My best guess is this.

An image backup can be either (a) true sector-by-sector of all sectors, or it can be (b) semi-intelligent. That is to say, with the latter, only sectors occupied by actual existing files will be copied to the image backup. Whichever applies the image backup is created in sector address sequence which makes it relatively easy for backed up and/or restored sectors to be omitted and only actual space occupied by current files restored. It also means that files fragmented when the image backup is carried out will remain fragmented when restored.

That is why I invariably do two things before I carry out an image backup. Firstly, I will run a disk clean up so that unneeded files are first deleted. Secondly, I will carry out a full defragmentation so that if I need to restore from that image it will be largely defragmented when restored.

So in a fully defragmented state a disk would consist of just two parts - a continuous band of space occupied by all the current files followed by a continuous band of available space.

As stated in post #13 above:

Originally Posted by bbearren

If you have absolutely no fragmentation on the drive, then the hundreds of temporary files that are created over the course of a Windows session will all be written at the end of the drive, which cannot avoid some deterioration of disk read/write performance simply by increasing head travel. Not wise.

A more useful algorithm is one that allows free space in a number of zones across the used portions of a drive so that the temporary files won't have to queue up at the very end to find any free space.

A "fully defragmented" state is not necessarily a good thing, performance wise.

Create a fresh drive image before making system changes, in case you need to start over!

"The problem is not the problem. The problem is your attitude about the problem. Savvy?"—Captain Jack Sparrow "When you're troubleshooting, start with the simple and proceed to the complex."—M.O. Johns "Experience is what you get when you're looking for something else."—Sir Thomas Robert Deware. Unleash Windows