Thursday, September 20, 2007

Housecleaning

Your computer, depending on use will every now and again require some general maintenance and care. Changing the oil, kicking the tires- that kind of thing. Since I'll be getting alot of this done on my systems this weekend, I thought Id blog about the process.

My usage varies. As serious as I want to claim that I am, I did build a computer to do my gaming on. I like to tell myself I did it because I wanted to keep my gaming files away from the machine most prone to viruses, and I certainly didnt want performance compromised on my file and web servers- so thats my story and I'm sticking to it. So, right to it.

Im thinking most computers will fall into this category. I send/receive emails, do downloads, do more downloads, and save files for sharing and such like that. Thats alot of online time with systems I cant control and dont always trust. So, in addition to the malware scans and the firewall I also take some time every week to defrag the drives the computer stores data on. Fragmentation occurs when the system cant or wont allocate enough contiguous space to store a complete file all together, but instead puts parts of it in gaps between other files (you get gaps in the first place because they used to hold a file that the system has subsequently deleted). Big files and big numbers of files help you get fragmentation faster and the drive slows down trying to sort through all the data to find you what you need (want). Defragmentation attempts to alleviate these problems.

The process of creating new files, and changing old ones , is sometimes called 'churn' and is, like fragmentation happens at main directory and subdirectory level. When you defrag your system, the program uses empty space on the drive to shuffle the data around to put files back where they should be. Files that should be next to eachother, get back together in a very memory intensive dance that cannot be performed on a system that has no freespace.
*some* files cannot be moved. System files, the swap file and other files labeled 'read only' wont be moved- but everything else is fair game. This can cause a problem say, if you copy a CD onto your harddrive. Files on a CD retain their 'read only' status when they hit your hardrive and you may end up with a big load of britney spears that you cant move for no good reason.
Also, while I'm thinking about it- a big misconception about defrag is that it stops your computer from acting wiggy. (Wiggy is a technical term) Not So! Your filesystem is designed to work around fragmented filespace. It works slower, but it works. What happens is, to run a defrag you must first run a chkdsk [chkdsk is a filesystem checkup utility]. Since it ends up being run first and usually fixes any problems it finds, people find their systems running all dandy after the defrag and assume that was the fix. Close. But no family friendly candy cigarettes.
Every system needs it every now and again, for me that one computer needs it more often. Not always because I notice it running slower or because i hear weird noises*. But because I know I shuffle bits on that computer like nobody's business. And If i want to keep performance up and my title as general nerd- I gotta put in the work.

If youre reading this youll prolly only need to do this at most every couple weeks, but you know what you do on your computer. Use your good judgment.

Ciao

* You know what it sounds like when your harddrive is doing what its supposed to. If you hear anything that even remotely sounds like your garbage disposal, hard shuddering clicks, polka music, or the like from your harddisk when you notice problems? Thats bad. Have it checked out. Soon.

No comments: