Thursday, October 7, 2010

Defragmenting your hard disk, why and when

Most people in the computer industry recommend you to defragment your hard disk to solve so many problems, the truth is that defragmenting is a good idea but it will make little if any noticeable difference to your computer(Sony Vaio VGN-FZ battery).

I have seen so many description of what defragmenting is, does, or means very few seem to be consistent.

In simple terms defragmenting a drive takes files and puts them in one single area of the hard disk(Sony VGP-BPS8 battery).

What are fragmented files

When you save a file to a hard disk it puts it in the free space at the end of the already saved data, it will continue to do this until the hard disk is full or you delete some files, when you delete a file from the hard disk it leaves a space, when you delete more files it leaves more spaces, depending on when the file was saved determines where the spaces are left, if you delete an early file the space will be towards the beginning of the hard disk.

This is fine the computer can cope with that, you will have your current data and some spaces where existing files were(Sony VGP-BPL9 battery).

This is where the problems start, if you want to save a new file where does it stick it? a/ at the end b/ in the big spaces.

The answer is none of those it puts the file in the first available space, for sake of example, supposing your new file is 100k and the file space left by the old deleted file is 10K, what the computer operating system does is put 10k in the first space, it also leaves a token saying where the rest of the file is, if the next space is 10k it will stick another 10k in there and another token until all the spaces are taken or the file is saved(Sony VGP-BPS9 battery).

This is not a big problem until you realise how many times you delete files and save new ones, also loading a file editing it and saving it again changes its size so it sticks the remainder of that edited file in the next space or if the file is smaller it creates a small space(Sony VGP-BPL11 battery).

What defragmenting does

Defragmenting a hard disk takes the files and moves them to the end of the hard disk, it then writes it back to the beginning when there is enough room so the file is in one continuous section of the hard disk, the effect is that the hard disk heads don’t need to move so far to retrieve the data, the file no longer has need of a token to say where the next file and therefore saving a small amount of space(Sony VGN-FZ460E battery).

The benefits of defragmenting

If all the file is in one area the hard disk can simply retrieve the data from one area and move one space to get the next instead of jumping from one area to another, this will save wear on the hard disk and therefore prolong its mechanical life(SONY VAIO VGN-FZ4000 Battery).

The myth about defragmenting

You will get many people, even some self appointed computer professionals saying that defragmenting will make a noticeable difference, defragmenting will make a difference to your hard disk but is not going to make any noticeable difference to you(Sony VGP-BPS13 battery).

The hard disk is the slowest critical part of your computer, hard disks can wizz around at up to 15,000 times a minute, the slow part is the head movement, the heads are physical and need to physically move to get the information from the disk platters, the heads can move very quickly but no where near as quick as the data when it has been retrieved, the drive interface and cable can handle any speed that the heads can take the data from the platters, in fact most of the time the interface is waiting for the data from the heads(Sony Vaio VGN-FZ21M battery ).

Because of this the hard disk very often has a cache this is a temporary store of hard disk data in RAM (Random Access Memory), the drive electronics looks at the data requested and will grab a chunk of data near to where the request was from in anticipation that that will be called next, if it is called next it does not need to move the heads but will send the data directly from the RAM cache, this makes the hard disk as fast as the cache on the hard disk(Sony VGN-FZ150E battery).

The cache loads files and puts it all in one area of the RAM so it effectively defrags as it retrieves it, when the data is requested by the computer it is sent as a single continuous data file(Sony VGN-FZ15 battery).

Defragmenting can save your hard disk a lot of work, defragging every month is not required but recommended to prolong the life of your equipment.

Defgragmenting can also be used to help diagnose faults with your computer(Sony VGN-FZ180E battery).

No comments:

Post a Comment