5.2 Squeezing Performance Out of Your Hard Disk

Your hard disk is more than just a storage device; it's used to hold your operating system and to supplement your system's memory. The speed and configuration of your hard disk is a major factor in your computer's performance, not to mention its reliability and security. The following topics all deal with different aspects of your hard disk and how effectively Windows uses it.

5.2.1 A Defragmentation Crash-Course

The best way to ensure maximum performance from your drive is to regularly (weekly or bi-weekly) defragment it (also called optimizing). Figure 5-3 shows how frequent use can cause files to become fragmented (broken up), which can slow access and retrieval of data on the drive, as well as increase the likelihood of lost data.

Figure 5-3. File fragmentation on your hard disk can slow performance and decrease reliability.

figs/xpan_0503.gif

To defragment your drive, run the Disk Defragmenter (dfrg.msc), which rearranges the files on your hard disk to make them contiguous (not broken into pieces). It also defragments the free space, and optionally places the files you access more frequently (such as programs and recently modified documents) at the start of the drive and less frequently accessed files at the back of the drive. If you're compulsive about disk defragmentation, superior alternatives to Disk Defragmenter include Norton Speed Disk (included with Norton Utilities, http://www.symantec.com) and Diskeeper (http://www.executive.com/).

 

Keeping an Eye on Prefetch

Prefetch is a new feature in Windows XP that stores specific data about the applications you run, in order to help them start faster. Prefetch is an algorithm that helps anticipate cache misses (times when Windows requests data that isn't stored in the disk cache), and stores that data on the hard disk for easy retrieval.

This data is located in \Windows\Prefetch, and, as the theory goes, periodically clearing out the data in this folder (say, once a month) will improve performance. As new applications are subsequently started, new prefetch data will be created, which may mean slightly reduced performance at first. But with older entries gone, there will be less data to parse, and Windows should be able to locate the data it needs more quickly. Any performance gains you may see will be minor, but those wishing to squeeze every last CPU cycle out of their computer will want to try this one.

 

5.2.2 Choosing the Right Filesystem

The filesystem is the invisible mechanism on your hard disk that is responsible for keeping track of all the data stored on the drive. Think of the filesystem as a massive table of contents, matching up each filename with its corresponding data stored somewhere on the disk surface. Windows XP supports three different filesystem types:[6]

[6] There's actually a fourth type, CDFS, used by CD-ROMs.

FAT (File Allocation Table, 16-bit)

FAT is used for all drives under 512 MB, including floppy and ZIP disks. The largest drive supported by the FAT filesystem is 2GB, which is why older drives larger than 2GB were often divided into several partitions.

FAT32 (File Allocation Table, 32-bit)

Designed to overcome the 2 GB partition limit with the FAT system, FAT32 is supported by newer operating systems. In addition to the support for larger drives, it also supports smaller file clusters (described later), so it's more efficient than FAT.

NTFS (NT Filesystem)

NTFS was designed from the ground up to completely replace FAT/FAT32. It supports encryption, compression, and robust security,[7] and is typically more reliable than FAT/FAT32 as well.

[7] The encryption and security features of NTFS are discussed in Chapter 8. NTFS compression is discussed in Section 5.2.5, later in this chapter.

If Windows XP is the only operating system on your computer, you should be using NTFS no question. The only compelling reason to use another filesystem is if you have a dual-boot setup with an earlier version of Windows, in which case you'd need to choose a filesystem recognized by all OS's on your computer. See the "File Systems and Multiple Drives" sidebar for more information. Table 5-1 shows which filesystems are supported by all recent versions of Microsoft Windows.

 

Table 5-1. Filesystems supported by recent versions of Windows
 

FAT

FAT32

NTFS

Windows XP

figs/check.gif

figs/check.gif

figs/check.gif

Windows 2000

figs/check.gif

figs/check.gif

figs/check.gif

Windows Me, 98, and 95 ORS2

figs/check.gif

figs/check.gif

 

Windows NT 4.0

figs/check.gif

 

figs/check.gif

Windows 95

figs/check.gif

   

 

To find out which filesystem is currently being used by a paricular drive, just right-click the drive in Explorer (or My Computer), and select Properties. Figure 5-4 shows the drive properties window for an NTFS partition. You can also open the Disk Management utility (diskmgmt.msc) to see an overview of all of your drives.

Figure 5-4. Use a drive's properties sheet to see which filesystem it's currently using.

figs/xpan_0504.gif

Note that some of the elements on the drive properties window won't be present for non-NTFS drives, such the Security and Quota tabs and the Compress drive and Allow Indexing options.

 

Filesystems and Multiple Drives

If you have more than one drive on your system, whether they're separate physical drives or separate partitions of the same drive, they can have different filesystems. This is common on multi-boot systems (discussed in Chapter 10), where each OS will reside on a different parititon. Just keep in mind the filesystem compatibility shown in Table 5-1; if you have Windows 98 on a FAT32 partition and Windows XP on an NTFS partition, the XP partition will be invisible to the 98 installation, but both drives will be visible and accessible from the XP installation.

 

5.2.2.1 Convert your drives to NTFS

If you're not using NTFS on your drive, and you don't need to support FAT/FAT32 for compatiblity with other OSs, you can convert your drive to NTFS quite easily, and without harming your data. For example, if you've upgraded to Windows XP from Windows 9x/Me, and you didn't elect to convert your drive(s) to NTFS during setup, you are likely still using FAT32.

Windows XP comes with the FAT to NTFS Conversion Utility (convert.exe), which is used as follows. To convert drive c:, for example, just open a command prompt window (cmd.exe) and type the following:

convert c: /fs:ntfs

The following options are also available for this utility:

/v

Run in verbose mode (provide more information).

/cvtarea: filename

Specifies a contiguous file, filename, in the root directory as the place holder for NTFS system files.

/nosecurity

Include this parameter if you want the initial security privileges for all files and folders on the newly converted volume to be set so the files and folders are accessible by everyone.

/x

Forces the volume to dismount first, if necessary closing any opened files on the volume. Use this option if you're on the network and there's concern that other users may attempt to access the drive during the conversion process.

Note that this is a one-way conversion, at least when using the software included with Windows XP. If you need to convert an NTFS drive to FAT32 for some reason, you'll need a third-party utility such as PartitionMagic (http://www.powerquest.com).

5.2.2.2 Understanding cluster sizes

Clusters are the smallest units into which a hard disk's space can be divided. A hard disk formatted with the traditional FAT system, found in Windows 95 and all previous versions of Windows and DOS, can have no more than 65,536 clusters on each drive or partition. This means that, the larger the hard disk, the larger the size of each cluster. The problem with large clusters is that they result in a lot of wasted disk space. Each cluster can store no more than a single file (or a part of a single file); if a file does not consume an entire cluster, the remaining space is wasted. For example, a 2-gigabyte drive would have a cluster size of 32 KB; a 1-KB file on a disk with a 32 KB cluster size will consume 32 KB of disk space; a 33-KB file on the same drive will consume 64 KB of space, and so on. The extra 31 KB left over from the 33-KB file is called slack space, and it can't be used by any other files. With thousands of files (especially those tiny shortcuts littered throughout a Windows installation), the amount of wasted slack space on a sizeable hard diskcan add up to hundreds of megabytes of wasted space.

The NTFS and FAT32 filesystems supported by more recent versions of Windows can handle over 4 billion clusters,[8] resulting in much smaller cluster sizes. The same 2-gigabyte drive formatted with FAT32 or NTFS will have only a 4-KB cluster size. Figure 5-5 illustrates the slack space created by files stored on a traditional FAT system versus the same files stored on a FAT32 or NTFS drive.

[8] Four billion clusters, at 4-kilobytes each, results in a maximum partition size of 1.6 terabytes (1600 GB) for FAT32 and NTFS volumes.

Figure 5-5. FAT 32 stores files more efficiently by allowing smaller cluster sizes.

figs/xpan_0505.gif

You can see how much space is wasted by any given file by right-clicking on the file icon, selecting Properties, and comparing the Size value with the Size on disk value.[9] The same works for multiple selected files and folders; highlight all the objects in your root directory to see the total amount of wasted space on your drive. To find the current cluster size of your drive, just open the properties sheet for a small file you know will only consume a single cluster (such as a Windows Shortcut); its Size on disk will be equal to the size of one cluster.

[9] You can also see the space wasted by all the files in a given folder by typing dir /v at the command prompt (see Appendix C).

So, what does this all mean? It means that if you convert a drive from FAT to FAT32, you will definitely reclaim some wasted space. But, since FAT32 and NTFS drives have the same cluster size (4 KB), there is no slack-space incentive to convert to NTFS. In fact, the extra features of NTFS (discussed earlier in this section) have slightly more overhead, and thus a conversion from FAT32 to NTFS will most likely result in slightly less overall free disk space.

5.2.3 Advanced NTFS Settings

As mentioned in the last section, the extra features of the NTFS filesystem come at a price: a small amount of disk space and performance overhead. The following settings allow you to fine-tune NTFS to squeeze the most performance out of your NTFS drive; experiment with these settings to find the configuration that works best for you.

Note that these settings will have no effect for non-NTFS drives. See Section 5.2.2, earlier in this chapter, for more information.

Start by opening the Registry Editor (described in Chapter 3), and expanding the branches to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Filesystem. There are three values here that concern us:[10]

[10] If any of the keys listed here are not present, they can be added by going to Edit figs/u2192.gif New figs/u2192.gif DWORD Value, and then typing the name exactly as shown.

NtfsDisable8dot3NameCreation

Values: 0 = enabled (default), 1 = disabled

Early versions of Windows and DOS did not support long filenames, but rather allowed only eight-character filenames followed by three-letter filename extensions. Although Windows 95 and all subsequent versions of Windows eliminated this restriction,[11] an eight-dot-three version of the filename was always generated to maintain compatibility with older applications. For example, the file, A letter to Mom.wpd would also be referenced as alette~1.wpd. If you don't use older 16-bit programs, either on your computer or on your network, you can disable Windows XP's creation of these 8.3 aliases by changing this value to 1 (the default is zero).

[11] Long filenames can be practically as long as you like, and can, for example, include spaces.

NtfsDisableLastAccessUpdate

Values: 0 = enabled (default), 1 = disabled

Windows keeps a record of the time and date every file and folder on your hard disk was created, as well as when it was last modified and last accessed. You can disable the update of "last accessed" information, which should marginally improve drive performance, by changing this value to 1 (the default is zero).

NtfsMftZoneReservation

Values: 1 = small (default), 2 = medium, 3 = large, 4 = maximum

The core of the NTFS filesystem is the master file table (MFT), a comprehensive index of every file on the disk (including the MFT itself). Since disk defragmenters can't defragment the MFT (also known as $mft), Windows reserves a certain amount of extra space for it to grow, in an effort to reduce its eventual fragmentation. The more fragmented the MFT gets, the more it will hamper overall disk performance.[12]

[12] See Section 5.2.1, earlier in this chapter, for more information.

You can determine the current size and fragmentation level of the MFT on any drive by opening Disk Defragmenter (dfrg.msc). Select a drive from the list, click Analyze, and then View Report (see Figure 5-6). The numbers relating to the MFT are shown at the end of the Volume Information report. Probably the most interesting statistic here, though, is Percent MFT in use. The higher the number, the less space the MFT has to grow (and it will).[13]

[13] For example, a 40 MB MFT file with 88 percent in use has 4.8 MB of empty space reserved for it, which means roughly 4,800 more files can be added to the volume before Windows increases the MFT, probably creating more fragments.

Figure 5-6. Find the size and fragmentation of the Master File Table (MFT) by viewing Disk Defragmenter's report for NTFS volumes.

figs/xpan_0506.gif

The NtfsMftZoneReservation setting allows you to increase the space reserved for the MFT. Although the default is 1, values of 2 or 3 are probably better for most systems with large hard disks; the maximum value of 4 is good for very large drives with a lot of small files. Specify too small of a value here, and the MFT will become fragmented more quickly as it grows; too large of a value, and it will consume (waste) too much disk space.

The problem is that changing this setting will not result in any modification of the current MFT, but rather only influence its future growth. For this reason, the earlier this value is increased in the life of a disk, the better. Unfortunately, the only way to defragment or rebuild the MFT is to format the drive.

You'll need to restart Windows for any of these changes to take effect.

5.2.4 Optimize Virtual Memory and Cache Settings

One of the most frustrating and irritating things about Windows is the way that it can seize up for several seconds with seemingly random, pointless disk activity. This is caused by the way that Windows handles disk virtual memory by default.

Normally, Windows loads drivers and applications into memory until it's full and then starts to use part of your hard disk to "swap" out information, freeing up more memory for higher-priority tasks. The file that Windows uses for this type of "virtual memory" is the paging file (a.k.a. swap file), pagefile.sys, and is stored in the root folder of your hard disk.

Because your hard disk is so much slower than your physical memory, the more Windows does this swapping, the slower your computer will be. Naturally, adding more memory will reduce Windows' appetite for virtual memory. But regardless of the amount of installed physical memory in your system, there are always things you can do to improve virtual memory performance.

Windows' defaults here are rather conservative and can fortunately be modified for better performance. It's important to realize, though, that some experimentation may be required to achieve the best configuration for your setup. Different hardware, software, and work habits require different settings; those with ample hard disks, for instance, can afford to devote more disk space to virtual memory, while others may simply wish to place a cap on the disk space Windows consumes.

5.2.4.1 Part 1: virtual memory settings

One of the reasons the default settings yield such poor performance is that the swap file grows and shrinks with use, quickly becoming very fragmented (as illustrated by Figure 5-3, earlier in this chapter). The first step is to eliminate this problem by setting a constant swap-file size.

Note that making the swap file constant will also result in a more constant amount of free disk space. If your hard disk is getting full, consider this solution to restrict Windows from using up every bit of free space:

  1. Double-click the System icon in the Control Panel, choose the Advanced tab, and click Settings in the Performance section. Choose the Advanced tab here, and then click Change. You'll see the Virtual Memory window, shown in Figure 5-7.

    Figure 5-7. Change the way Windows handles virtual memory to improve overall system performance.

    figs/xpan_0507.gif

  2. The virtual memory settings are set for each drive in your system independently. If you have only one drive, virtual memory will be enabled for that drive. If you have more than one drive, virtual memory will be enabled, by default, only on the drive on which Windows is installed.

    For each drive, you have three choices, all of which should be pretty self-explanatory. The total disk space for all drives is shown at the bottom of the window.

    Important: after you've made a change for any drive, click Set to commit the change before moving onto another drive or clicking OK.

  3. To specify a constant size, select Custom size, and then type the same value for both Initial size and Maximum size.

    The size, specified in megabytes, is up to you. I typically use three times the amount of installed RAM (e.g., 1536 MB of virtual memory for 512 MB of physical memory), but you may wish to experiment with different sizes for the one that works best for you.

     

    Some users have had limited success disabling virtual memory altogether, although I wouldn't recommend it. The theory is that if there's enough physical memory installed, and virtual memory is completely disabled, Windows will access the hard disk much less often. It may be worth a try if you have at least 512 MB of physical memory, but you may find that certain programs won't run without at least some virtual memory. It's even possible that eliminating the swap file will prevent Windows from loading altogether.

     

  4. Press OK on each of the three open dialogs. If you have only resized your swap file, you won't have to restart. However, if you've added (or removed) a swap file on a different drive, Windows will prompt you to restart at this point.

5.2.4.2 Part 2: defragment the paging file

Part 1 will eliminate the possibility of your swap file becoming fragmented, but it won't defragment an already fragmented swap file. You'll need to defragment it at least once for it to remain that way in the future. See Figure 5-3, earlier in this chapter, for details on file fragmentation. Note that this is not an easy task if you don't have the right tools. Here are several ways to accomplish this:

  • If you have Norton Utilities (http://www.symantec.com), you'll be able to optimize the swap file fairly easily using the Speedisk utility. Speedisk is also able to move your swap file to the physical beginning of your partition, which can also theoretically improve performance. The Disk Defragmenter utility that comes with Windows XP (dfrg.msc) is actually a scaled-down version of Norton Speedisk, but it is not capable of defragmenting the swap file.

  • If you don't have software capable of defragmenting your swap file, there are two alternatives. If you have more than one partition or hard disk in your system, start by moving your swap file to a different drive letter (see the previous section for details). Then, run Disk Defragmenter (dfrg.msc) on the partition you wish to hold the swap file permanently, which will set aside a large chunk of contiguous free space. Lastly, move the swap file back to the original partition, making sure its size is set constant.

  • If you don't have a second partition, your other choice is to disable virtual memory temporarily by clicking No paging file and then Set in the Virtual Memory window (see Figure 5-7). After restarting Windows, run Disk Defragmenter (dfrg.msc) to set aside a large chunk of contiguous free space. When you're done, go back to the Virtual Memory window, and re-enable the paging file, making sure to set a constant size.

 

Note that if you have fewer than 256 MB of physical memory, there is a risk that Windows may not boot properly without a paging file. If this happens, you should be able to load Windows in Safe Mode and re-enable your swap file. See Section 6.2.1 for details.

 

5.2.4.3 Part 3: clear the paging file on shutdown

It's possible to have Windows delete your paging file whenever you shut down Windows. There are three reasons you might want to do this:

  • If you have a multi-boot system, as described in Chapter 10, each operating system on your computer will have its own virtual memory settings. If the paging file from one OS is present while the other is running, it may cause a conflict and will certainly waste a lot of disk space.

  • If your paging file becomes corrupted or highly fragmented, Windows may load more slowly (or not at all). Deleting the paging file will force Windows to recreate it the next time it starts, which may alleviate this problem.

  • If you're concerned about the security of your data, it is theoretically possible for a hacker to extract sensitive information from your paging file.

Naturally, if you've gone to the steps to defragment your paging file, as described earlier in this topic, you probably won't want it to be deleted (lest it become fragmented when it is recreated).

Here's how to do it:

  1. Open the Local Security Settings console (secpol.msc). See Chapter 8 for more information on the settings in this window.

  2. Navigate to Security Settings\Local Policies\Security Options.

  3. Double-click the Shutdown: Clear virtual memory pagefile entry on the right.

  4. Select Enabled and then click OK. You'll need to restart Windows for the change to take effect.

5.2.4.4 Part 4: advanced settings for the adventurous

Like virtual memory settings, disk cache settings in Windows XP aren't necessarily optimized for the best performance, but rather for the best compromise between performance and compatibility with older computers.

Each of these settings, as described here, will typically benefit only those with large amounts of physical memory (at least 384 MB). Those with less memory (under 256 MB) may not see any performance increase; in fact, some of these settings may actually degrade system performance if your system has too little RAM. Essentially, you'll want to experiment with different values until you find ones that work best for your system.

 

Entering incorrect values for some of these settings can render Windows inoperable. Make sure you have a recent backup before you continue, not only of your system, but of the specific Registry key discussed (using a Registry patch, explained in Chapter 3).

 

Start by opening the Registry Editor (described in Chapter 3), and expanding the branches to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management. Some of the more interesting values in this key include the following:[14]

[14] If any of the keys listed here are not present, they can be added by going to Edit figs/u2192.gif New figs/u2192.gif DWORD Value, and then typing the name exactly as shown.

DisablePagingExecutive

Values: 0 = disabled (default), 1 = enabled

Enabling this setting will prevent Windows from paging certain system processes to disk, which effectively will keep more of the operating system in the faster physical memory, which, in turn, will make Windows much more responsive.

IoPageLockLimit

Values: varies

This value, in bytes, specifies the maximum amount of memory that can be used for input/output operations. Since this setting deals with the transfer of data into and out of your computer, it will be of the biggest benefit to those running servers and those who use their network or Internet connections most heavily.

The default value is 512 KB (524,288 bytes), but increasing it should improve performance. This value is specified in bytes (not MB) and must be entered in Hexadecimal mode.[15] Recommended values, based on the amount of physical memory in your system, are shown in Table 5-2.

[15] When editing DWORD Values in the Registry, you can choose the Base to use (Hexadecimal or Decimal). If you use the incorrect base, the value you type will have a different meaning. See Chapter 3 for details.

 

Table 5-2. Recommended values for the IoPageLockLimit setting

Amount of physical RAM

Recommended value

Maximum value

128 MB

4194304 bytes (4 MB)

physical RAM minus 16MB

256 MB

10485760 bytes (10 MB)

physical RAM minus 32MB

512 MB or more

41943040 bytes (40 MB)

physical RAM minus 64MB

 

LargeSystemCache

Values: 0 = standard (default), 1 = large

By default, Windows uses only 8MB of memory for the filesystem cache. Enabling this option will allow Windows to use all but 4 MB of your computer's memory for the filesystem cache. This will improve Windows' performance, but potentially at the expense of the performance of some of your more memory-intensive applications.

This option can also be changed by going to Control Panel figs/u2192.gif System figs/u2192.gif Advanced tab, clicking Settings in the Performance section, and then choosing the Advanced tab. The Memory usage section has two settings: Programs and System cache, which correspond to the 0 and 1 values here.

Other values in this key include PagingFiles, which is more easily set in the Virtual Memory window described in Part 1 of this section, and ClearPageFileAtShutdown, more easily set in the Local Security Settings console described in Part 3.

5.2.5 Increasing Disk Space (or What to Throw Away)

Parkinson's law states that work expands so as to fill the time available for its completion. Along the same lines, it's safe to say that files will quickly expand to fill the amount of available disk space.

Low disk space doesn't just make it harder to store files, however; without ample room for virtual memory (discussed earlier in this chapter), Windows' performance will slow to a crawl. Lower disk space also increases file fragmentation, as Windows scrambles to find places to place the data; this, in turn, greatly lowers performance. Keeping a healthy amount of free disk space is vital to a well-performing system.

Additionally, removing drivers and applications that are no longer used clears more memory and processor cycles for your other applications, which can substantially improve overall system performance.

Even before you install your first application, your hard disk is littered with files from the Windows installation that you most likely don't need. The standard installation of Windows XP puts about 10,000 files in more than 600 folders, consuming more than a gigabyte of disk space.

Whether you need a particular file can be subjective; the 2.5 MB of .wav files that one person might consider excessive might be valued by another. Naturally, it makes sense to be cautious when removing any files from your system. The removal of certain files can cause some applications, or even Windows itself, to stop functioning. It's always good practice to move any questionable files to a metaphorical purgatory folder before committing to their disposal. And I don't have to tell you that routinely backing up your entire hard disk (see Chapter 6) is very important. What follows are some tips to help you identify the more common files and folders that can be safely removed, as well as those that should be left alone.

5.2.5.1 Windows XP files that can be deleted

The following tips apply to files located in your Windows folder or a subfolder thereof. Select Search and then For Files or Folders from the Start Menu, type c:\windows in the Look in field (assuming Windows is installed on drive c:), and type the filename as described later in the Search for files or folders named field. For example, to search for all files with the .tmp filename extension, you would use the asterisk wildcard character, like this: *.tmp.

Note that this is only a guideline; I'm not instructing you to delete all of these files (okay, maybe I am a little). If you're in doubt about a specific file, see the Section 5.2.5.4 section that follows for details on finding out what's inside of most types of files. The following files are typically safe to delete:

  • Any file with the filename extension: *.log, *.old, *.- - -, *.bak, and *.000, *.001, *.002, and so on.

  • Any files with the extensions *.bmp (bitmap files), *.wav (sound clips), and *.avi (video clips). These can take up a great deal of space and usually are superfluous.

  • In the Windows folder only, there are a ton of text files (*.txt), which are essentially "Readme" and log files and can be safely deleted. Double-click any text file to view its contents.

  • Any files or folders found in your \Windows\Temp folder. You won't be able to delete some files in this folder, because they will be in use by whatever applications you may have open. But applications in previous Windows sessions may not have deleted files there, and those types of files tend to accumulate very rapidly. It's not uncommon to find dozens of megabytes of useless files here. If you find files in your Temp folder that have a date and time earlier than the last time you started your computer, you can safely delete them. See Section 4.4.2 for more information on the Temp folder.

  • The following file dates are common to older versions of Windows (releases other than the American English editions may have different dates); some files with these dates may still be around if you've upgraded to Windows XP:

     

    July 11, 1995, 9:50 AM

    Windows 95

    August 2, 1996, 1:30 AM

    Windows NT Workstation 4.0

    August 12, 1996, 3:50 PM

    Windows 95 OSR2

    May 11, 1998, 8:01 PM

    Windows 98

    April 23, 1999, 10:22 PM

    Windows 98 Second Edition

    December 7, 1999, 5:00 AM

    Windows 2000 Professional

    June 8, 2000, 5:00 PM

    Windows Me

     

  • See Section 4.4.2 for more information on all the extra empty folders that Windows won't let you delete.

5.2.5.2 Files found elsewhere on your system

In addition to those files in your Windows folder, there are plenty of files elsewhere that you can consider deleting:

  • There are some unnecessary files in the root directory of your boot drive (usually c:\); these include files with the extensions *.txt, *.prv, *.log, *.old, and *.- - -. Most files with the *.dos extension (except for Bootsect.dos see Section 5.2.5.3 later in this chapter) are also safe to delete.

  • Other files that can be deleted include Mscreate.dir, an absolutely useless, empty, hidden file created by older Microsoft application installers. There may be hundreds of these empty files on your hard disk.

  • Folders named ~Mssetup.t, msdownld.tmp, WUTemp, or something similar are temporary folders created when some applications or Windows updates are installed. They can all be removed, as long as you've restarted your computer since said installation took place.

  • If you're trying to create more disk space, you can also delete application help files (*.hlp and *.chm) you may never need (as a last resort). Also, many applications include bitmaps (*.bmp), sound clips (*.wav), and video clips (*.avi , *.mov, and *.mpg), which take up enormous amounts of disk space for virtually no reason. To view a video clip before deleting it, just double-click the file icon.

5.2.5.3 Files NOT to delete

In your travels, you may encounter some of the following files, all of which should be left alone:

  • Any files in your root directory not mentioned earlier should be left alone. This includes Bootsect.dos, Boot.ini, Ntldr, and Ntdetect.com, all parts of the Boot Manager (discussed in Chapter 10). You may also see Io.sys, Msdos.sys, and Command.com, if you've set up a dual-boot system with Windows 9x/Me.

  • Be extremely careful with anything in the \Windows, \Windows\System, and \Windows\System32 folders, as they may be vital Windows support files.

  • Your Registry hive files, discussed in Chapter 3, should never be moved or deleted.

  • Any files and folders in your \Program Files or \Windows\MSAPPS directories that have names like Microsoft Shared and Common Files. These files can be used by several applications simultaneously, which is why they haven't been placed in the folders of the applications that put them there.

5.2.5.4 If in doubt

Before you delete any questionable file, there are several things you can do to get a better idea of what the file contains:

  • Start by double-clicking a suspicious file to open it in its default application. If you then see the Open With dialog box, it means the specific filename extension has not yet been registered. In that case, your best bet is to drag-drop the file into an open Notepad window.

  • Right-click the file, and select Properties. If the file has a Version tab, it's likely an application, driver, DLL, or other support file. Choose it to view the manufacturer, copyright date, and possibly the application it accompanies.

  • If you're not sure if something should be deleted but want to try anyway, move it to another directory first to see if everything works without it for a week or so. If all is clear, toss it.

  • Check the file's Last Accessed date (right-click it, and select Properties). The more recent the date, the more likely it's still being used. For information on removing a particular application, contact the manufacturer of that application or refer to the application's documentation.

5.2.5.5 Special consideration: hidden files

Some files on your hard disk are hidden files files that, by default, can't be seen in Explorer. To configure Explorer to show hidden files, go to Control Panel figs/u2192.gif Folder Options figs/u2192.gif View tab, and select the Show hidden files and folders option. All hidden files will become visible, but their icons will remain somewhat transparent.

Most hidden files have been hidden to protect them from deletion. If you see a hidden file, think twice before deleting it for this reason. On the other hand, some hidden files are truly unnecessary and are hidden only to reduce the clutter they would otherwise generate. An example is the temporary hidden file Microsoft Word creates alongside every open document.

To hide or unhide a file, right-click its icon and select Properties. Check or uncheck the Hidden option as desired, and click OK.[16]

[16] The Attrib command in DOS command is used to list the attributes of files (e.g., Hidden, Read-only), as well as to turn those attributes on or off. It's also the only way to turn on or off a file's System attribute. See Appendix C for details.

5.2.5.6 Special consideration: System File Protection and System Restore

When I first installed Windows XP, I proceeded to delete the superfluous

Internet Connection Wizard folder,[17] as I do whenever I install a new version of Windows. This time, I was in for a surprise seconds after I deleted it, I saw it reappear as though Windows was telling me, "Just kidding!"

[17] Windows runs the Internet Connection Wizard once: the first time you try to access the Internet after installing Windows XP, regardless of whether you already have a dial-Up Networking connection configured. In some cases, you'll see this useless wizard appear again and again.

It turned out to be the System File Protection feature, which continually scans your system, replacing system files as it sees fit. Unfortunately, this approach creates several problems, not the least of which is the 12% of your hard drive's total capacity it consumes. See Section 6.3.4 in Chapter 6 for more information on this feature, as well as on the related feature, System Restore.

If you do decide to disable System File Protection, you can then safely delete the Internet Connection Wizard.

5.2.6 Eliminate Unwanted Windows Components

In addition to the settings and tweaks described elsewhere in this chapter, a common and effective technique for removing the bottlenecks in Windows is to eliminate the programs and Windows components you don't use.

Most optional Windows components can be removed by double-clicking on the Add or Remove Programs icon in Control Panel, clicking Add/Remove Windows Components, and unchecking any unwanted components. Single programs may not seem to make much of a difference, but they do add up. Note, however, that not all optional components are listed here.

  1. Start Notepad (or your favorite plain text editor), and open \Windows\Inf\Sysoc.inf.

  2. The structure of this file is that of an .ini file, discussed in Chapter 3. The [Components] section lists the components shown in the Windows Components Wizard. Each entry in this section has this format:

    name=options

    where options is a list of parameters, separated by commas. The second to last parameter is the one that interests us. If it's empty (nothing between the surrounding commas), the corresponding entry will appear in the Windows Components Wizard. Otherwise, if the parameter is hide, the entry will not appear. To "unhide" the entry, simply delete the hide keyword. For example, the entry for Windows Messenger looks like this:

    msmsgs=msgrocm.dll,OcEntry,msmsgs.inf,hide,7

    To add Windows Messenger to the list, allowing you to remove the component, simply change the line so it reads:

    msmsgs=msgrocm.dll,OcEntry,msmsgs.inf,,7
  3. When you're done, save the file, and re-open the Windows Components Wizard to see the new entries.



Windows XP Annoyances
Fixing Windows XP Annoyances
ISBN: 0596100531
EAN: 2147483647
Year: 2005
Pages: 78
Authors: David A. Karp

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net