Computer Big Lab

Home Previous Page Hot Links Mobile Tips IT Certifications About Us

 

Google

      Maintaining Pc Tips and Tricks

 

Defragmenting Your Drive

So what exactly is disk fragmentation, and what does Windows' Disk Defragmenter do about it? Here's a nice description from The Elder Geek: "As advanced as hard drives have become, one item they are not very good at is housekeeping, or maybe that should be drive keeping.

 

When files are created, deleted, or modified it's almost a certainty they will become fragmented. Fragmented simply means the file is not stored in one place in its entirety, or what computer folks like to call a contiguous location. Different parts of the file are scattered across the hard disk in noncontiguous pieces. The more fragmented files there are on a drive, the more performance and reliability suffer as the drive heads have to search for all the pieces in different locations. The Disk Defragmenter Utility is designed to reorganize noncontiguous files into contiguous files and optimize their placement on the hard drive for increased reliability and performance."

If Defragmenter says that your drive is "only" 4% fragmented and doesn't need defragging, do it anyway. 4% of 1 gigabyte is more than you think, and those of us with bigger drives are that much more fragmented. Never let your drive get to 10% fragmentation if you can help it. Once a month is a good rule of thumb; heavy users may want to defrag twice a month. Expect Defrag to take a good while, especially if your drive is heavily fragmented. Take your much-neglected sweetie to dinner, and disable the screen saver before you go. If it seems to hang, leave it alone for a while -- it is probably working on a particularly fragmented section of hard drive and while it seems to have locked, it is actually busy. (One way to tell is to look at the disk-activity light on your computer. If there is hard disk activity, the light will be on, at least intermittently.) Premature shutdown of Defrag can zap your whole file structure. Hands off for at least an hour. Go to dinner, come back, and if it's still hung, then and only then shut it down.

Some alternative information from PC Magazine: The frequency with which you defrag your computer depends on the type of work you do. Programs that create multiple temporary files (for example, scanning software) require defragging more frequently. Also, if your disk drive is only 20 percent full, there isn't much need to defrag except at regular maintenance intervals. If it's 70 percent full, however, your system will likely benefit from it.

Ignore the quick defrag options and pick the slowest, most complete mode. Some users start Defrag as their last computer task before bed, letting the beastie wend its way through the disk during the night. It will be done by the morning.

Win 98/ME users, you have a better Defrag utility than the 16-bit one packed with Win 95. One setting is particularly useful. When you crank up Defrag, click the Settings button and make sure that the option labeled "Rearrange program files so my programs start faster" is selected. This moves the programs and documents that you use most often to the faster parts of your hard drive.

Win XP users have a "boot defrag" option that places boot files next to each other on the hard drive, thus speeding up startup. Boot defrag should be enabled by default, but to make sure, drill down to the Registry key HKEY_LOCAL_MACHINE \ SOTWARE \ Microsoft \ Dfrg \ BootOptimizeFunction and look in the Name column on the right side of the window. Check that the Data value for Enable is set to Y. If it is, close Regedit. If not, right-click on Enable and choose Modify. Change the value to Y, choose OK, and close Regedit.

Win XP Pro is a bit inconsistent in its automation of Defrag. It will open the app but apparently won't let you automatically start the process. Since Defrag is quite schedulable, what's the problem? The problem is that Task Scheduler has no connections to Defrag, so you can't use it to schedule automatic defragging. Defrag can run fine with no graphical front end at all and that's the key to using it in an automated fashion. To use Defrag (and other, similar system tools) this way, you launch the tool via a command line plus any "switches" you want to use to modify the file's behavior. Open an empty XP "command window" by clicking Start, Run, and typing the word COMMAND in the Run line. Click OK. A command window, usually a mostly black box, will open. In Notepad, enter one line of plain text: DEFRAG C: Now, click to Notepad's File/Save As menu. Navigate to your Desktop in the "Save In" portion of the dialog. In the "Save As Type" scroll box, scroll down to the "All Files" type (instead of the default "Text Documents"). Finally, in the "File Name" area, name your new file DEFRAG C.BAT (or any similar, obvious name ending in ".BAT"). Then, click Save. The file should be added to your desktop with a .BAT extension (instead of a .TXT extension). For example, if you have other drives or partitions, you can either defrag them via separate batch files (a "DEFRAG D.BAT" file could contain just the line DEFRAG D: for example), or you can enter the lines serially into one batch file. You can make a batch file called "DEFRAG_ALL.BAT" for example, containing these lines:

                                                                  Page  1   2   3


 

 


 

 

 

Maintaining Pc Tips

 

 

 

 

 

 

 



 

 

 

 

 

 


 

 

 





 

Copyright © 2005, www.computerbiglab.com.