วันพุธที่ 30 เมษายน พ.ศ. 2551

Defrag Your HDD! (It's Not As Painful As It Sounds)

One of the easiest ways to boost overall performance from your PC is to do regular hard disk maintenance. It's not glamorous or even exciting, as a matter of fact, it's downright boring. However it is relatively painless and easy to do. In this article, I want to discuss defragmenting your hard drive. I'll give you a moment to finish yawning before continuing.....OK feel better now? Let's get to it. Most PC users, even a lot of beginners, know about the defrag utility built into Windows. Some people even use it occasionally. However, judging by my experiences in the field, even those who use it fairly regularly could use a few pointers on how to get the most out of it.

First of all, what is disk fragmentation? We could get really technical and discuss file systems, cluster sizes and the like but I doubt you want to read it anymore than I want to write about it (BORING!...). You don't really need to understand all of the technical details to understand that fragmentation can and does have a big impact on overall computer performance. I should explain however, that of all the major components of your computer, the hard drive is far and away the slowest. Knowing this, it should make sense that anything we can do to help this "weak link" with performance will improve the the overall computing experience.

Without going into a lot of detail, I'll start with a brief explanation of how a hard drive works and what causes data fragmentation. Ready? Here goes: The hard drive has a series of platters that contain all of the stored data on your PC (including the operating system, programs and all of your personal data). These platters rotate at a high rate of speed and as they rotate, a mechanical read/write head moves along the surface of the platters and... well, reads and writes data. Your data is stored on this disk in clusters. A single file usually consists of many of these clusters. Over time as you use the computer these clusters get scattered all over the drive and as a result, the files contained in the clusters become fragmented.

The reason that this negatively affects performance is that when the read head looks for a particular file, it can find that information much faster and more efficiently if the clusters containing that file are in contiguous order as opposed to being scattered all over the drive. Think of it this way: If you have a stack of money in various bill denominations, how much faster and more efficiently could you count it if the bills are grouped according to denomination and placed in descending (contiguous) order! The process of defragmentation finds these scattered clusters of data and puts them back in order so that the read head can find them faster.

Now that you are familiar with that concept, let's get going with the defrag. For those of you who aren't familiar, the windows defrag utility is located under 'Start > All Programs > Accessories > System Tools'. When you start the application, the user interface is pretty straightforward. You just select the drive that you want to defragment and click the button that says "Defragment". If you don't do any more than this, you'll go a long way toward improving the responsiveness of your computer. However, there are a couple major limitations in the defrag utility that can easily be overcome if you know what to do. Here are a couple of tricks you can use to really get the most out of the defrag process.

Temporarily remove the pagefile. Windows uses a section of the hard disk as virtual memory to help speed up performance of the PC. This virtual memory space is known as the paging file or swap file. Windows uses this reserved space to move frequently accessed data into and out of as you work (or play) on your computer. Because this space is reserved as system file space, the defrag utility cannot defragment this section of the disk. This reserved space can be quite large and will become very fragmented over time and since this is the first area of the disk that is accessed by the system when requesting data, it goes without saying that it's counterproductive for this file to be highly fragmented. So to get this file back in order you have to delete it. (?!) Don't worry, you are not going to delete anything important and it's only temporary. Here's how to do it:

First, save all work and close all open windows. Once you have done this, go to 'Start > Control Panel(Classic View) > System'. Select the 'Advanced' tab and click on the 'Settings' button under 'Performance'. Again, select the 'Advanced' tab and under 'Virtual memory' click the 'Change' button. Click the radio button that says "No paging file" and click the 'Set' button. Now close each dialog box by clicking 'OK' on each one. You'll get a message stating that the changes require the computer to be restarted. Click 'OK' and restart the PC. When the computer reboots it may seem a little sluggish, but that's OK because when you're finished with the defrag, you will restore the swap file and it will be one big contiguous file. That's a VERY good thing!

Now, before you run the defrag utility, there is one more thing you can do to help optimize the defragmenting process. If your PC has hibernation enabled (it is by default), it uses a file called hiberfil.sys to store the current state of your PC before it "goes to sleep". This file is then restored when the computer "wakes up" so that it is in the exact same state it was in before hibernating. The whole hibernation thing is a long story and the subject of another article, so for now just understand that hiberfil.sys is a very large file that becomes fragmented over time and because it is designated as reserved system space, can't be defragmented. So again, the solution is to remove the file. Windows doesn't need hiberfil.sys to run properly. It is only necessary if you want your computer to have the ability to hibernate when left unattended, so restoring hiberfil.sys is completely optional after you defragment the hard drive. To delete hiberfil.sys, right click any open area on the desktop and choose 'properties'. Select the 'Screen Saver' tab and click the button toward the bottom labeled "Power". When the 'Power Options' dialog box opens, select the 'Hibernate' tab. Remove the check from the box that says "Enable hibernation". The hiberfil.sys file will automatically be deleted.

Now that you have removed these two rather large and uncooperative files run the defrag utility as described above. This time the ENTIRE hard drive will be defragmented! See now, that wasn't so bad. After windows finishes defragging the disk, don't forget to re-enable the paging file. Navigate to the virtual memory dialog as described above and this time click the radio button that says "System managed size". Click 'Set' and close all the dialog boxes. Optionally, you can re-enable hibernation also, but it's not necessary unless you use the hibernate feature.

Well there you have it! A completely defragmented and optimized hard drive and it didn't cost you a dime. After following this procedure, you'll definitely notice that your PC has a little more "spring in it's step". I certainly hope this article has been useful to you. If it has, be sure to visit my website at http://www.odessacomputerguy.com and while you're there sign up for my newsletter. It's free and full of useful tips and tricks you can use to get the most out of your PC.

Scott Drinkard (The Computer Guy) is a self -employed computer service tech living and working in Odessa, Texas. The owner of Odessa based "The Computer Guy" has been helping the good people of West Texas with their computer problems for about 10 years. Please visit http://www.odessacomputerguy.com for more information.

Article Source: http://EzineArticles.com/?expert=Scott_Drinkard

ไม่มีความคิดเห็น: