Question about fragmented files

  nickyjane 23:15 15 Dec 2003

Hi guys. why and how do files get fragmented and can I stop it happening. running xp home

  Forum Editor 23:30 15 Dec 2003

And here's a simplistic explanation why:

Whenever you launch a program Windows loads what it needs into RAM, and uses it as and when it needs to. As you work, Windows fetches and carries parts of the program - back and forth from the hard drive and the RAM. Sometimes you'll be using more than one program, and you'll be surfing the net and probably checking your email.

While you're doing all that Windows is rushing around like a mad thing, fetching bits of programs and putting them away again, except there isn't time to put everything back in exactly the same position each time. Gradually, over a period, this fragmentation becomes worse, until eventually Windows begins to slow down under the strain of having to go and pick up all the bits of program from all over your hard drive each time you launch Word for instance.

Windows knows where to go, because each time it puts anything anywhere on your drive it records the position very accurately in a kind of database (sometimes called a File Allocation Table or FAT). The trouble is that once the drive gets well and truly fragmented it can take quite a while to find things, and Windows has to charge around the drive collecting enough stuff to put a window on your screen and allow you to work.

Defragmenting the drive allows all the bits to be sorted into their correct order and placed in neat chunks. If the drive was badly fragmented you'll be able to detect a definite speed increase afterwards.

Does that help? The process is in reality quite complex, and I've kept to basics. 23:32 15 Dec 2003

something from your hard drive it leaves gaps. The next time something is put on the hard drive it will fill these gaps, and what is left goes somewhere else, until the gaps are filled.

So you could end up with a large file spread over several fragments, making it harder work for the HD.

  nickyjane 23:48 15 Dec 2003

Thanks for the replys, the only problem i have is when I use "diskeeper lite " it never has fully defragged and also leaves some files fragmented, is this normal.

  Dragon Heart 23:58 15 Dec 2003

In my experience yes ! eg XP refuses to defrag My Documents folder

  nickyjane 00:42 16 Dec 2003

thanks for all your answers.

  Simsy 09:02 16 Dec 2003

muddying the issue here.

One of the concepts that is relevant, but hasn't been mentioned above, is that a SINGLE file consists, in fact, of MANY pieces...

It's a bit like a book... only a single book, but it consists of many pages. Your HDD is like a blank book where the pages, (clustors), are of predetermined size. A single file may use many clustors, just as a written article may use many pages. (However, unlike the written work, where a new article may begin on the same page that a previous one finishes, a clustor cannot contain parts of more than 1 file.)

When you write an article you continue over several CONSECUTIVE pages until it is finished. It is the same when a file is written to the HDD; consecutive clustors are used. You then write a different article starting on the next page. Then you go back to the first article and want to write more.... you have to write it after the second article. The first article is now "fragmented"...

I now change analogys slightly...

When you get a "mail order" delivery, it often consits of more than 1 package. If it consists of, say, 4 parcels, they will be labelled "1 of 4", "2 of 4", "3 of 4" and "4 of 4". On the HDD the bits of the file are similarly tagged. As the parts of a file are saved/resaved to the HDD, the location on the HDD of each of these parts is noted in the FAT, (as described above by the FE). Because of this the parts don't NEED to be on consecutive clustors on the HDD. However, if they aren't then it takes longer for all the parts of a file to be retrieved an loaded into RAM. The purpose of defragging is to get all the parts for a single file together so that it may be more quicky retrieved. When you defrag it performs this action for ALL the files on the drive, hence the culmatative effect on speed may be quite noticeable.

Well that's my understanding. With apologies if it's not exactly correct... and I'd welcome any clarification myself if it's completely wrong!

I hope it helps,



This thread is now locked and can not be replied to.

Elsewhere on IDG sites

OnePlus 5T review

How to draw a mandala

iPhone X review

Les meilleures enceintes Bluetooth à moins de 150 euros