Feedback/Questions

If you have any topics you would like me to cover or just general feedback on blogs I have written feel free to email me at helloriker@hotmail.com.

Saturday, September 12, 2009

What is Fragmentation?

This may be a term you have heard of but really do not understand what it means. Or more to the point you may not truely understand how it effects you. Fragmentation can greatly effect the speed at which your computer runs. If you had a fast computer when you first bought it and now it is running incredibly slow fragmentation may be one of the root causes. So how can you fix it?

Well before we get to fixing it lets try and understand what fragmentation is. Fragmentation happens over time as files are written and deleted from the hard disk. When the hard disk is partitioned it is divided up into writeable chunks. Files will fill up these writeable chunks in a contiguous stream. If there is not enough contiguous space then the end of the current stream will be left a marker to where the stream continues. This is fragmentation. Each time the system has to find a new location on the hard disk for the file the seek time to load that file increases.

How does this happen? Well lets say you start off with a bunch of small files written to the disk. These files will be written in a constant stream. Where one file ends the next one starts. Then you then eliminate a small batch of these files from the disk thus freeing up space on the disk. This also now creates a pocket where data is going to be written to. Lets say the next file you write is significantly larger then one of the files you deleted. It will attempt to write to the disk and fill up the space of the smaller file first. When it runs into the next file on the disk it will skip to the next available space on the drive and so forth until the file is written out. Multiply this effect over time and you can get a severly fragmented drive.

Not to worry though it is incredibly easy to fix. Just open up My Computer, right click on the drive, and go to the tools tab. You will see a button that says defragment my drive. Click it and go through the prompts and it will clear up this fragmentation. It will basically go through the drive and move files around to attempt to make them contiguous streams thus saving you read time.

Later I will post an article on how to automate defragmentation of the drive so that you never have to worry about it again.

4 comments:

  1. here's a link to how defrag is improved AND automatic in Windows 7:
    http://blogs.msdn.com/e7/archive/2009/01/25/disk-defragmentation-background-and-engineering-the-windows-7-improvements.aspx

    ReplyDelete
  2. As noted in one of the responses the disk defragmentation for Windows 7 may not run automatically. In order for it to do so the system must be left on 24/7 to ensure that it is run at the scheduled time.

    It is interesting however to read about some of the performance changes made between XP and Vista.

    Also the graphics are quite nice in that blog!

    ReplyDelete
  3. "system must be left on 24/7 to ensure that it is run at the scheduled time." that should be another blog topic.... notice how light bulbs tend to burn out when turned on?

    ReplyDelete
  4. Hmm I like the way you think! I have made a note to write something up about the longevity of a PC when left on 24/7 vs when it is not. That is going to take a bit of research to find some good numbers and determine best practices.

    ReplyDelete