APLawrence - Information and Resources for Unix and Linux Systems, Bloggers and the self-employed
RSS Feeds Get APLawrence.com by RSS














(OLDER) <- More Stuff -> (NEWER) (NEWEST)
Printer Friendly Version



Why defrag Windows XP and Vista Desktops?




2008/12/13

People argue about whether you need to bother with defragging Linux and Mac OS X drives. Very few people even bother to argue about defragmentation of Windows machines. It's just a given - the machine is slow, defrag it. Case closed.

I've always been a little skeptical about defragging Windows desktops. Servers running databases or big apps, sure: defrag that puppy. But desktops? What's going to get fragmented on a typical user's XP or Vista desktop machine?

In user file space, there are really only two areas that the ordinary user is likely to have fragmentation that matters. One is Outlook PST files and the other is virus definition files.

Oh, sure, there are other places that get fragmented. The indexes for Temporary Internet Files, for example. Do you care? That's probably the first thing you clean up when your browser gets slow anyway, right? You might have some other large files of your own: big photos, a .zip file you downloaded.. are they slowing your system down? Of course not: maybe when you look at that photo it loads a little slower than it could, but so what? The zip file doesn't matter either - how often will you be unpacking it?

If you aren't USING a file, fragmentation in it does not matter. The pretty map may show lots of fragmentation, but if none of it is in files you are reading or writing, none of it affects you.

Windows Restore Point files are bound to be fragmented, but do you care? You aren't likely to access them at all, but if you do, an extra second or two because of excess file seeks is the least of your concerns.

With Outlook, you'd be far smarter to avoid large PST files anyway (and even smarter to avoid Outlook outright!). Either use IMAP or if you must put things in personal files, keep your Inbox and Deleted folders small. Make appropriate folders for things you want to keep and keep those folders lean and mean also. If you are so disorganized that you can't do that, at least move everything from Inbox once a month or once a quarter and just name the new folder "Inbox200812" or whatever makes sense to you. If you do just this (and don't use Deleted Items as a filing cabinet!) you'll likely eliminate any fragmentation that could happen here.

You can't control virus definition files, of course. They are going to get updated, and they are going to fragment. Unfortunately, as new definitions get downloaded very frequently, it's likely that they will re-fragment very quickly after you clean them up. You aren't going to spend hours defragging your disk every time a new file comes down, right?

Another place with a similar problem is Windows Update. The patch files aren't quite as frequent as virus updates, but again they are likely to get fragmented quickly. What can you do?

There is a single file defragger: Contig by By Mark Russinovich. This is a free download that you can use to target specific files rather than tying up your machine for hours running the disk defragmentation program.

Paging and Registry file fragmentation

Your Page and registry files can get fragmented. Unfortunately, these are off-limits to most defragmentation software. Mark Russinovich comes to the rescue again with PageDefrag, which runs as your system boots to reorder these files. But is there any point? I'm not convinced there is for your Page file(s). Your access to memory is very random, so what good can be accomplished by re-ordering things in swap? I just can't see that doing much of anything for you. As to the registry, I suppose if you are constantly adding and removing programs and you have a lot of them, your registry files might get big enough to benefit, but I bet it's rare to see more than one or two extents in any of them. No harm in running this once out of curiosity, but I can't see it as anything you'd use often.

I just took a look at my wife's XP box. It's several years old and if it has ever been defragged, it was a long time ago. Here's what the analysis phase said it found:

Volume ACER (C:)
    Volume size                                = 25.25 GB
    Cluster size                               = 16 KB
    Used space                                 = 20.49 GB
    Free space                                 = 4.76 GB
    Percent free space                         = 18 %

Volume fragmentation
    Total fragmentation                        = 16 %
    File fragmentation                         = 30 %
    Free space fragmentation                   = 3 %

File fragmentation
    Total files                                = 63,417
    Average file size                          = 306 KB
    Total fragmented files                     = 3,712
    Total excess fragments                     = 17,943
    Average fragments per file                 = 1.28

Pagefile fragmentation
    Pagefile size                              = 756 MB
    Total fragments                            = 9

Folder fragmentation
    Total folders                              = 6,876
    Fragmented folders                         = 33
    Excess folder fragments                    = 118

--------------------------------------------------------------------------------
Fragments       File Size       Most fragmented files
86              5 MB            \PHOTOS\2006\Roll 3\MOV00362.MPG
249             114 MB          \WINDOWS\Installer\508A391.MSP
215             7 MB            \WINDOWS\Installer\1A67BF3D.MSP
153             6 MB            \WINDOWS\$HF_MIG$\KB956390-IE7\SP2QFE\IEFRAME.DLL
145             11 MB           \Documents and Settings\All Users\Application Data\Symantec\LiveUpdate\Downloads\1195148577jtun_nav2k6enn01m25.m25.full.zip
274             5 MB            \Documents and Settings\LINDA\Local Settings\Temp\ATT1.eml-2.txt
193             384 MB          \Documents and Settings\LINDA\Local Settings\Temp\pft1A.tmp\QBooks\DATA1.CAB
122             10 MB           \Documents and Settings\LINDA\Desktop\All Pictures\Thumbs.db
102             2 MB            \Documents and Settings\LINDA\Desktop\All Pictures\P1010829.JPG
102             4 MB            \Program Files\Common Files\Symantec Shared\VirusDefs\20080712.002\TCSCAN7.DAT
267             8 MB            \Program Files\Common Files\Symantec Shared\VirusDefs\20080712.002\VIRSCAN5.DAT
315             25 MB           \System Volume Information\_restore{3B5EBD63-0BA3-4CB6-8D46-0666EE4E44F9}\RP351\SNAPSHOT\_REGISTRY_MACHINE_SOFTWARE
110             26 MB           \System Volume Information\_restore{3B5EBD63-0BA3-4CB6-8D46-0666EE4E44F9}\RP354\SNAPSHOT\_REGISTRY_MACHINE_SOFTWARE
185             26 MB           \System Volume Information\_restore{3B5EBD63-0BA3-4CB6-8D46-0666EE4E44F9}\RP356\SNAPSHOT\_REGISTRY_MACHINE_SOFTWARE
 

Pretty much what I'd expect, right? She doesn't use Outlook, so none of that junk appears. The only other thing in the list that would ever affect day to day operation are the Symantec A/V files. We know that those are going to re-fragment quickly.. is there really any reason to defrag this disk?





By the way, did you notice the Pagefile had 9 fragments? That was AFTER running PageDefrag, so it's easy to think there's not much to be gained there - it became fragmented again almost instantly!

I ran the defrag program - all the "restore" files ended up in the list of "Files that cannot be defragmented". As I noted above, that doesn't really matter, but another file unable to be defragged was a Quickbooks data file. Defragging didn't help us with that!

Now of course there will be exceptions. Maybe you run a large database on your desktop. Maybe you regularly download large files for other reasons and use them regularly. You could have specific needs for defragmentation. Linda has that Quickbooks file, for example. But if you do, you probably know that already, right? For most people, housekeeping (cleaning up temporary files, keep PST files small) is likely to have far more effect than defragmentation.




Click here to add your comments





Sat Dec 13 21:23:51 2008: Subject: Pagefile fragging   bob4linux


In my Win98 days I put my swap file on its own small partition and gave it a max+min of 300 megs. Otherwise it just gets spread everywhere like a mad dog defecating. Win98 bless it inspired me to move to Linux and I thank MS for that.



Sat Dec 13 22:07:20 2008: Subject:   TonyLawrence

gravatar
We don't have much to thank them for, do we? :-)





Sat Dec 13 22:26:46 2008: Subject:   jtimberman


I haven't run defrag on a Windows system since I started using Windows 2000 back in, uh, 2000. That includes several XP workstations/gaming systems, and four Vista systems.

It really isn't necessary as you say. It's also a ridiculous "troubleshooting" tactic used by helpdesks too. Once, I had cable modem connection issues and they asked me if I defragged my hard drive. I said yes to placate them, but they didn't know that all the systems on my network at the time ran Linux or Solaris, except the W2K gaming system, and it was being reinstalled at the time.



Sun Dec 14 03:39:08 2008: Subject:   TonyLawrence

gravatar
Yeah, the questions asked by first level support can be pretty annoying..



Sun Jan 4 20:51:24 2009: Subject:   TonyLawrence

gravatar
Whether or not you defrag, try to keep the noise down:

http://de.youtube.com/watch?v=tDacjrSCeq4

Don't miss responses! Subscribe to Comments by RSS or by Email

Click here to add your comments


If you want a picture to show with your comment, go get a Gravatar



numly esn 20856-081213-125694-91
numly barcode

Have you tried Searching this site?

Unix/Linux/Mac OS X support by phone, email or on-site: Support Rates

This is a Unix/Linux resource website. It contains technical articles about Unix, Linux and general computing related subjects, opinion, news, help files, how-to's, tutorials and more. We appreciate comments and article submissions.

Publishing your articles here

Jump to Comments



Many of the products and books I review are things I purchased for my own use. Some were given to me specifically for the purpose of reviewing them. I resell or can earn commissions from the sale of some of these items. Links within these pages may be affiliate links that pay me for referring you to them. That's mostly insignificant amounts of money; whenever it is not I have made my relationship plain. I also may own stock in companies mentioned here. If you have any question, please do feel free to contact me.

Specific links that take you to pages that allow you to purchase the item I reviewed are very likely to pay me a commission. Many of the books I review were given to me by the publishers specifically for the purpose of writing a review. These gifts and referral fees do not affect my opinions; I often give bad reviews anyway.

We use Google third-party advertising companies to serve ads when you visit our website. These companies may use information (not including your name, address, email address, or telephone number) about your visits to this and other websites in order to provide advertisements about goods and services of interest to you. If you would like more information about this practice and to know your choices about not having this information used by these companies, click here.


book graphic unix and linux troubleshooting guide

My Troubleshooting E-Book will show you how to solve tough problems on Linux and Unix systems!



 I sell and support
 Kerio Mail server




pavatar.jpg
More:
       - Microsoft
       - Disks/Filesystems




Related Posts

Degragmentation wars

file system fragmentation linux

defrag mac os x hfs+ ?



Unix/Linux Consultants

Skills Tests

Guest Post Here











My Favorites

Change Congress