PDA

View Full Version : Disk Defrag


Rob Lister
23rd October 2006, 08:04 PM
Yes, I know, it is only something one with a m$ pc does when it is quite obvious that one needs a new computer...but that's not the topic.

Yes, I know, any decent operating system would be defraging either on the fly, in the background, or whenever the processor was not otherwise occupied...but that's not the topic.

The real topic is why it is so creepingly slow.
I can't figure out what it is thinking about.

Edumacate me!

rockoon
23rd October 2006, 08:26 PM
Welcome to the big numbers.

The typical hard drive has 100 Billion (as in 100,000,000,000) bytes of capacity which is broken up into 4096 byte chunks called a Sector.

So the typical hard drive has 25 million Sectors

A naive defragmentation algorithm would perform 25 million read operations and 25 million write operations, which would take an extremely long amount of time considering the physical nature of the process (as in moving parts)

It is "thinking" about how to do it with fewer than 25 million read/write operations.

Zep
23rd October 2006, 09:36 PM
And before each read/write, it has to check it isn't being used by someone/something else first (in case moving it would confuse the heck out of them).

PLUS...

It has to keep track of where stuff is being written to, so it can be sure it can put all the bits of each file in one straight (logical) line.

PLUS...

Stuff keeps being mashed up while it is busy just up ahead, so it sometimes has to re-defrag stuff it only just defragged a moment ago. Bummer!

PLUS...

Most people don't get around to defragging for months, nay YEARS!, after their PC s/w has been installed. By which time the disk is a totally tangled mess of tens of thousands of files all in little bits strewed everywhere around the disk. Which takes MUCH effort to untangle. Like so much in life, the first time is the most difficult. ;)

SezMe
23rd October 2006, 10:01 PM
Related question: Is there any way to defrag the registry?

Soapy Sam
23rd October 2006, 10:13 PM
Yes.
There are several commercial apps that do so.
I use part of the Ontrack Systemsuite.

That said, I don't know if "defragging" means exactly the same in the two cases.

Zep
24th October 2006, 03:12 AM
I think the sort of thing they do is a clean-and-reindex of the registry database structure. Similar to what you can do to most database systems.

SezMe
24th October 2006, 03:20 AM
Yes.
There are several commercial apps that do so.
I use part of the Ontrack Systemsuite.

That said, I don't know if "defragging" means exactly the same in the two cases.
Soapy, I went to the OnTrack site and it appears they do not sell SystemSuite any more. I'll go noodling about and see what else I can find.

alfaniner
24th October 2006, 07:03 AM
One suggestion -- always make a backup first.

Segnosaur
2nd November 2006, 02:30 PM
Yes, I know, any decent operating system would be defraging either on the fly, in the background, or whenever the processor was not otherwise occupied...but that's not the topic.

The real topic is why it is so creepingly slow.
I can't figure out what it is thinking about.


One thing you may want to try is degragging in safe mode.

I've run into problems on some computers where services are running in the background sometimes write to the disk... this sometimes causes the degrag algorithm to restart at the very beginning.