Should I Defrag?

by on Mar.16, 2010, under technology

If you use a computer (and, since your reading my blog, I assume you do), you might have heard the term “defrag” at some point or another. †Maybe instructions for installing a program said you should defrag your harddrive before you install it (I believe “The Sims” had this in their instructions), or perhaps you’ve just heard one of your friends use the word. †Today, I†received†an e-mail from my dad asking me a seemingly-simple question: “Should I periodically de-frag my laptop? What does this do? How do you do it?” †My response, however, was a bit more complicated.

In this blog post, I’m going to attempt to explain, very simply, what defragging a harddrive actually does, and why you should, or shouldn’t, do it. †Some of my more technically inept readers may think I’m oversimplifying things by not dealing with the different filesystems, not explaining exactly how data is written, etc., but that’s not the point of this post. †My goal is to explain, in the simplest terms possible, how your harddrive works, and what defragging the harddrive does, in terms of how data is stored on the drive. †To start, I’ll explain the typical way data is stored on the drive, then I’ll talk about what types of situations create harddrive fragmentation, next I’ll explain why fragmentation is bad for your harddrive, and, finally, I’ll give an argument about whether or not you should run a defrag tool.

First, let me attempt to explain what defragging a harddrive actually does. †Even though harddrives are disks, a good way to visualize them is by laying the data bits (all the ones and zeros) out in a line. †If you take this line of data, and curve it into a spiral, you’ll get your harddrive back. †But, because it’s easier to demonstrate things by using a line, I’ll assume that you can understand that even though your data is curved on the disk, we can pretend it’s all lined up. †There are two main parts to data on your harddrive: a table telling the computer where files are on the harddrive, what they’re named, how big they are, etc.; and the actual data of the files.

When you write a file to the harddrive, two things happen: one, the harddrive adds an entry to its file table with information about the file; two, the data of the file is written in the appropriate place on the harddrive. †Because when you get a new harddrive, there’s no data on it, files are written as far to the left as they can be. †So, if you write five small files to your harddrive, the information might look like this on the drive:
As “A” takes six units of space; “B”, 9; “C”, 7; “D”, 12; “E”, 8. †You’ll also notice that all the files are continuous. †This is what your harddrive likes. †Generally, you will read a file on your drive from start to finish, in order. †If the file is stored on your harddrive that way, there’s very little work to be done. †Your harddrive moves to the beginning of the file, and reads the data in order. †Now let’s say you delete A, C, and E, and write a big file F:
As you can see, the file “F” takes up all the space that A, C, and E did. That’s 21 units of disk space, for those keeping track. †If your harddrive wants to read the file “F”, it has a lot of work to do! †It has to now take some time to move over files B and D in order to read F from start to finish. †We call F a “fragmented” file, because fragments of it are stored on different places in the harddrive.

This is the main way fragmentation is created: deleting files, and creating new ones. †Most of the time, your drive will try to store data as close to the beginning of the drive as possible. †So, if you find yourself creating and deleting files often, you probably have a fragmented drive. †In this way, fragmentation is pretty unavoidable. †Bigger drives are less prone to fragmentation, because there will be more empty space at the end of the drive, but most drives will eventually end up with some fragmented files.

So, why is fragmentation bad for your harddrive? †Well, the problem is that harddrives aren’t made to last forever. †And, depending on how fragmented your drive is, you can greatly shorten the life of your drive. †The more you have to move around on the drive to read data, the shorter your drive will last.

Finally… should you defrag or not, and, if so, how often? †In general… no, you probably don’t need to defrag. †Windows Vista and Windows 7 actually come with utilities to help prevent fragmentation in the first place. †On Windows XP, there is a special defrag tool. †There’s a possibility that you’ll notice a speed increase after defragging your harddrive, but most likely, the difference will be negligible. †All the defrag tool does is rearrange files on the drive so they’re all nice and in order. †If we were to take the example from above, your drive would look like this after defragging it:
However, defragging every now and then won’t hurt the drive. †If you really want to take the time to go through the process, it’s probably safe to do once every six months or so. †Any more often than that and you risk putting too much stress on the drive, and actually shortening the life of the drive even more.

As a final note, because Solid State Drives are becoming more popular, it should be noted that you should NOT defrag a solid state drive for any reason. †Solid state drives have fundamental differences in the way they work from standard harddrives, and defragging a solid state drive WILL cause a reduction in drive life.

:, ,

3 Comments for this entry

  • Jaypee

    I think the Windows defraggers leave much to be desired. Although the Win7 version is a definite improvement over Vista, they dont compare with the fully automatic third party tools available.

  • TrueJournals

    I’d definitely agree with you, Jaypee. The windows defraggers do an OK job, but third-party solutions are the best. Although, I did really like the defrag tool in XP.

  • Livia Durphey

    Some very interesting factors however i feel your research and bias leaves quite a bit to be desired. Then after all, thatís simply my opinion. Have a fantastic day positively a thought-upsetting post.

Leave a Reply

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

Visit our friends!

A few highly recommended friends...