To Defrag or Not To Defrag, That is the question

Let's look at what files Windoze uses in its day to day operation.

OS specific files in the Windows directory

These files are usually installed on a clean disk and are therefore contiguous. Patches will be installed and some of these files will become fragmented.

Virtual memory - swap file

Created at installation time, does not vary much. Minimal fragmentation.

Application files - Word, Firefox etc

Loaded anytime, maybe long after the disk has been in use. There will be some fragmentation.

Temporary Files

Created, deleted and changed often. These files are always fragmented.

Data

Similar to temporary files, expect fragmentation.

What does Windows use most?

Temporary files are most often accessed, then virtual memory, then data and Windows files and applications. On this basis you would want your swap file to be contiguous because this will most likely affect performance, but you can limit swap file use by having more memory than you can use - a minimum of 512MB for normal computer use, 2GB or more for high demand users. Temporary files and data are impossible to keep contiguous, so this leaves applications and Windows files as candidates for de-fragmenting.

What difference will it make?

Where contiguous files are an advantage is in reading large files - you only have one disk access to read the directory data and another to read the file. Large files are relatively few on your disk, the swap file, a few Windows and application files, and maybe one or two data files. The rest of the time you are reading and writing small chunks of files, and the disk overhead is the enemy here.

How can I make it faster?

More RAM is undoubtedly the best method. Windows will spend less time accessing the swap file and more hard disk will be cached in memory, so disk access will take place in bursts when your computer is less busy.

Is de-fragmenting bad?

No, it's just not the answer to more speed. It helps when you have less RAM than you really need, but you will always be chasing your tail. There is, however, a potential downside. Every disk write has an element of risk and if you are re-writing a large part of the disk often you increase the chance of a problem, especially if you have a power glitch mid de-frag. Plus there is the time and endless frustration of waiting for the thing to finish so you can get on with important stuff, like reading my posts.

What should I do instead?

Backup. Spend your time more wisely and backup your data to DVD or external hard disk, then when you have a problem - yes you will - you can retieve that important spreadsheet or email.

 
faq_defrag.txt · Last modified: 2010/05/05 08:56 by paul
 
Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki