Today's lesson:
Most of us know our computers run faster if we Defrag (defragment) them regularly. As files are created, expanded, shrunk, or removed, they tend to spread over the surface of the hard drive - a piece here, a piece there, and lots of empty space between files. The fragmented files will become even more fragmented as soon as a file arrives that is too large to fit into one of the empty spaces. Running Microsoft Defrag does a credible job of rearranging all the file fragments so that most files are contiguous (not in pieces), and all stored at the head of the drive.
However, Microsoft did not address some important issues when it licensed the Defrag software
for DOS 6, then re-wrote it for Windows 95. One problem is that files with the System attribute
set are not moved. If they get written to the drive in a fragmented state, they stay fragmented
forever. Further, if during the Defrag process, a file is too big to fit between the last-placed file
and the first piece of a file is marked as a System file, the file being moved gets split to accommodate the System file. Either way, immediately after performing a Defrag operation, you already have files that may not actually have de-fragmented.
Another issue is programs that periodically write to the hard drive or swap data to and from the hard drive in a scheme called virtual memory as they achieve what Microsoft calls their "time slice". And, when a screen saver program is running, the Defrag process is interrupted each time the screen saver hides or restores the screen.
To get the best Defrag operation imaginable - the absolute fastest file access times your PC is capable of, you must run Defrag in Safe Mode. Safe Mode marks the bare minimum of files as System files, so more files can be safely moved. It also runs almost no background programs, which could cause disk writes that would interrupt the Defrag operation.
The following procedure, which I try to perform once a month, is the process that I use. I do not use Microsoft Task Scheduler to do it since I always turn it off to minimize the number of useless programs running in the background.
- (Optional) Disable Virtual Memory to eliminate the huge clump of file space normally occupied by the Windows Swap File and marked as a System file. To do this:
- Right-click My Computer, then select Properties.
- Select the Performance tab, then Virtual Memory.
- Click in the button that says "Let me specify my own virtual memory settings", then the box that says Disable Virtual Memory (Not - Recommended). (They are right. It is not a smart way to run a computer, but it is the best way to fully defragment the disk, and we'll change it back once the process is complete.
- A box pops up, asking you to confirm the virtual memory settings and recommending against the changes. Click Yes anyway.
- When asked to reboot in order to implement the new settings, if you can easily choose Safe Mode in the reboot process (see Step 2, below), select Yes. Otherwise, select No and use the Safe Mode shortcut described at the end of this article.
- Boot in Safe Mode (see Appendix). There will be a warning screen telling you that you are in Safe Mode (like you couldn't tell from the hideous video!). Click OK to make the warning blurb go away.
- Check your Display Settings (right-click on the desktop, then select Properties) to be sure you're not running a screen saver. If you are, turn it off by choosing None from the list.
- If running Windows 98, run the Disk Cleanup Wizard to delete all unnecessary files: Start » Programs » Accessories » System Tools » Cleanup Disk. Be sure to include the Recycle Bin unless you've just added files to it today.
- If running Windows 95, find all files with the tmp extension and delete them: Start » Find » Files or Folders » *.TMP » Find Now. Once Windows stops scanning, click any one of the files found, then press Ctrl-A on the keyboard to highlight all files found, followed by Shift-Del to delete them all, bypassing the Recycle Bin.
- Empty the following folders:
- C:\Windows\Temp
- C:\Windows\Temporary Internet Files
- C:\Temp (if you have one)
- Recycle Bin
- Run Scandisk with the Thorough option selected to be sure the disk is reliable enough to trust moving your
files to new locations: Start » Programs » Accessories » System Tools » ScanDisk. This will take a while, but it's necessary if you don't want to lose data. Besides, this is one reason we do this only once a month.
- Run Defrag from the Run dialog box (Start » Run), typing in this command line:
DEFRAG C: /F /S /H /ALL /DETAILS /NOPROMPT
- /F causes a Full Defrag, filling spaces and de-fragmenting files.
- /S allows System files to get moved as needed.
- /H tells the program it's okay to move files marked as Hidden.
- /ALL causes All local hard drives to be processed.
- /DETAILS makes all the pretty little boxes appear on the screen as the defragmentation progresses. (Guess you could leave off /DETAILS, but then you'd miss out on the best part of owning a Win9x computer.)
- /NOPROMPT tells Defrag not to stop and ask if it needs to restart, and to exit to the Windows desktop when degragmenting is complete.
- When the process is complete:
- If you turned off Virtual Memory earlier, go back to the Virtual Memory settings and click on the "Let Windows manage my virtual memory settings. [Recommended]" button.
- If you turned off a screen saver, you could go to Display Settings and turn it back on. I recommend you leave the Screen Saver turned off, and use the Power Options applet in Control Panel to set the delay before Windows blanks the screen.
- Reboot into Normal Mode by clicking Start » Shut Down » Restart » OK.
|