Speaking of Defraging

Whilst waiting for windows to load on my computer my friend says “geez, when was the last time you defragged?!” “Um, never, I hear its not good for your computer”. Then she promtly started the defrag process. I notice no significant speediness in anything…BUT sometimes when I reboot, its like an older version of my desktop appears. All my newer files are gone and so is my wallpaper, it just goes back to the way it looked two months ago before she defragged it! Wha…?! This is espcially annoying when I’m in a hurry and need a file and my old version pops up, and none of my newer files exisist. But then I reboot and all is fine. I don’t understand. Why did this happen? Is this common? How can it be fixed?

C

Here is a excerpt I send to clients to explain, I can not take credit for this explanation, and can not remember where I got it from, at any rate, it explains it, and should also be noted that the defragging has nothing to do with the old desktop you somethimes see…

I first learned about defragmentation while talking to my father. He was a programmer back when “mass storage” meant a two foot reel of magnetic tape whirling away next to a room-sized mainframe computer. Today, we are spoiled by cheap 7200 rpm hard drives transfering data at 40 megs a second, with seek times under 9 ms. But back then, “seek time” actually meant something. If you wanted to retrieve a particular record from a database, it involved a gruelling wait as the tape turned around and around, finally reaching the right spot.

Later, when tapes began to store files under a system much like the one in use on today’s hard drives, fragmentation became a serious problem. So what is it? To answer that, you have to know a little bit about the way data is stored on a random access device (modern tape drives, hard drives, RAM, CDROM’s. . . just about any computer storage technology.)

First of all, files as we know them mean nothing to your hard drive. They’re just chunks of data that the operating system requests from time to time. For any file system to work, there has to be a way of quickly locating the file you want. Obviously you can’t just search through the entire drive, one byte at a time, until you find what you’re looking for. If you have an MP3 file that occupies 4 megs, your operating system needs to know exactly where that file is on your disk, so that when you go to play it, it can tell your hard disk to seek to the exact location where the data begins and spit out 4 megs of it.

The solution is a File Allocation Table (FAT). Your operating system uses the first part of your drive as a FAT, storing the names of all your files and their physical locations on the disk. If you want to access “stayinalive.mp3”, your operating system looks in the FAT and cross-references the file name to a specific location on disk. It tells your hard drive to seek to the proper location and retrieve the data.

Bingo, disco inferno!

But there’s a complication. To have a speed-efficient FAT, the data area of the drive must be divided into a finite number of identically-sized clusters (allocation units). Each cluster can hold only one file. Obviously, a single cluster (only 4 to 32k in size) will not accommodate a large file. In this case, the cluster holds the first portion of the file, and contains a pointer to the next cluster in the chain of clusters that collectively holds the entire file. Usually, the next cluster in the chain comes immediately after the preceding cluster. All well and good, but let’s look at a common scenario:

A file is written to disk; its chain is closed. A second file is written to disk. Logically, the operating system places this second file immediately after the first file on the physical disk. The second file is closed. But some time later, the first file needs to be changed – information must be added. What does the OS do? It cannot simply tack the extra data onto the end of the file, for that would overwrite the file beginning immediately after it. Instead, the OS begins adding to the file somewhere else on the disk. Then, it goes to the end of the original chain and adds a new pointer, indicating where the rest of the chain continues.

The problem with this method is that, although it is close to 100% efficient at conserving space, any files that are constantly modified will begin to occupy several chains across the disk. When these files are accessed, the drive must seek back and forth to read them in their entirety. Thus, when a file does not occupy a single, physically-continuous chain, we say it is fragmented.

Defragmentation works by examining the chain structure for every file on your drive, and then rebuilding fragmented files into single, continuous chains. For a large drive with many frequently-used files, this process is understandably slow.

Windows 98 and presumably all future Microsoft operating systems have Intel’s Application Launch Acceleration Technology incorporated into Disk Defragmenter. This feature takes advantage of the fact that Windows records the precise order in which any application loads its support files. When your disk is being defragmented, files are physically placed in the exact order they are loaded by common programs, reducing seek times later on, since the drive can now read data in a continuous stream.

This sounds marvellous, but the fact is that today’s drives seek very, very fast. Spending two hours to defragment a hard drive and move large chains back and forth will not save you two hours of lost performance. And defragmentation is certainly not the magical “cure all” many tech support personnel make it out to be. Still, it’s a useful chore when a computer is otherwise unoccupied.

      • Norton Utilities/Speed Disk works in about one-fifth the time of the regular Win98 defrag. It has other options Win defrag doesn’t have at all, and using it often has not ever caused either of my Win98 PC’s any problems. - MC

I like System Suite 2000. It has tons & tons of features.

Cornelia, you have to give us: 1. type of computer 2. operating system version

Exactly. I have never understood why defrag programs don’t incorporate “freespace” between files. They mostly just seem to get jammed right next to one another, so that if a file grows to a larger size, it is going to be fragmented very quickly.

I could understand this when disk space was at a premium, but these days 90% of users with a new computer have a bunch of empty space that they’ll likely never use. Is there an “intelligent” defragmenter out there that makes use of unused disk space by inserting freespace? If not, should I try to write one and make a fortune?

Norton’s Speed Disk does not do defragging. It optimizes the disk, but that’s not the same thing. However, I found that if I optimize first, then defrag, I can get the defrag done completely. Yesterday, by coincidence I optimized first and then defragged, and for the first time got 100% defrag (in 45 minutes).

Optimization consolidates clusters and re-arranges them, if necessary, but does not defrag. It, apparently, however, makes defragging quicker and easier. I went to Safety Mode before defragging.

I have a Dell Inspiron 3800 with Windows 98.

Thanks,

C

I would say you could use the restore registry feature but its tricky to do in w98, easier in Me. it seems its just going back to a previous registry, that’s what happened to your icons & all.

Also, if W98 has Active Desktop, use that feature as it can easily restore your desktop for ya easily. I don’t remember if w98 has it or not.

      • I never really used a disk tool to examine exactly what Norton/Speed Disk does, but its own help files files plainly state that it defrags and optimizes (reorders the whole disk, which you can watch it do).
  • The quicker option unfragments files often leaving empty space in between them, but does not reorder the whole disk. - MC

I use Norton 2002, which contains the Speed Disk. It will not defrag, but it will tell you how much of the disk is fragmented.

I would like to mention a few things. One it does not take 2 hours to defrag. If it did then you would prob see an increase in speed.

The second thing is this persons problem. What you described sounds like a virus. Or, a wacked out machine. That is not a symptom of a defrag.

      • There’s Something Some Of Us Are Not Seeing Here: Norton Utilities 2001’s own help files clearly says that Speed Disk defrags and optimizes. The explanation I find on the MS site for defragging is “reordering file clusters contiguously”. The explanation I find for optimization is “grouping all related program files together”.
  • Granted, Norton may not use the same sorting method as the MS defrag: just for fun I ran Norton Speed Disk, and then Win98 defrag, and observed that defrag moved around a bunch of stuff in the first few thousand clusters [Win system files] but pretty much just filled in the spaces from then on.
    (-for unknown reasons, Norton leaves a few small spaces in between file groups) - MC

Actually, the reason is explained in the help file.

Those spaces allow the fragmented files to stay close to their bretheren, thus reducing seek time. The windows defragger leaves no gaps, and the result is fragmented files all over the map.

Theoretically, it sounds like a good idea, but I doubt if it makes much diff.

The booklet with Norton System 2002 states: “Speed Disk optimizes fragmented filed by rearranging file fragments into adjacent or contiguous clusters…Speed Disk also creates contiguous free space on the disk, improving system performance when you add new files.”

It also adds that defragmentation and optimization are often used interchangeably, but they are not the same. Defragmentation rearranges the way files are organized on a disk so that the data comprising each file is stored in adjacent or contiguous disk clusters. Optimization maximizes the usable free space on a disk by grouping files based on how they are accessed. Free space is consolidated to avoid fragmenting newly added files, and extra space is added after major data structures so they can grow without immediately becoming fragmented again.

Altho the Help section mentions defragmenting, the booklet doesn’t and the booklet does not state that it will defrag, but it will optimize.