Export (0) Print
Expand All
4 out of 7 rated this helpful - Rate this topic

First Steps

Archived content. No warranty is made as to technical accuracy. Content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
By David L. Farquhar

Chapter 2 from Optimizing Windows for Games, Graphics and Multimedia, published by O'Reilly & Associates, Inc.

When Windows sets itself up, it makes a number of assumptions about what you want to do with your computer. I have installed Windows 95 on literally hundreds of computers since its introduction, and I have yet to see one installation where those assumptions were correct. Windows' incorrect assumptions come at a price--they consume memory, CPU cycles, or both.

Computer manufacturers make a set of assumptions as well. Frequently, their decisions about setup seem to be aimed at making their computers look flashiest in the store--of course that computer has to be the best, just look at all the spinning icons and listen to all the cool sounds! The result is a system that's hopelessly overburdened.

What this means is that no matter who you are and no matter what you do with your computer, there are probably a few adjustments you can make to your system's configuration that will make the system run better.

As I said in Chapter 1, System Optimization Theory, computer speed is a complex formula, with CPU speed, amount of memory, memory speed, motherboard speed, video card speed, and hard disk speed being the major variables. Before spending money on hardware upgrades, it makes sense to take what's already there and maximize it.

Every major computer magazine publishes a yearly list of Windows tips, including a handful of speedup tips. These tips work, though their effectiveness tends to vary a bit. The biggest problem is that there just isn't enough room in a magazine to go into much depth about why these tricks work, so the magazine articles end up being a bit superficial.

Chances are, if you're reading this book, you're dissatisfied with your computer's performance. Having seen Pentium systems that run slower than the typical 486, I understand that. I've seen it often. That said, I've also seen overachieving 90 MHz Pentiums that certainly felt much faster, usually because someone beat me to optimizing them. This chapter begins to explain what I do when I sit down in front of a computer and the user or owner complains about it being too slow--or I get sick of waiting on it. Like me, you may find that an overachieving 90 MHz Pentium isn't half bad.

Most of these tricks are easy to implement, so let's start off with the classic, easy-to-implement tips that make a difference right away. Many of these changes will require you to restart the system in order for them to take effect. Unless I tell you specifically to reboot immediately, answer no when given the choice. Make all the changes you want, then restart, and the changes will all take effect at once. While this goes against standard troubleshooting advice, most of these tips won't cause problems, and none cause any problems that later chapters don't tell you how to solve.

On This Page

Check Your Free Disk Space
Lose autoexec.bat and config.sys
Make Sure Your System Is Using 32-bit Drivers
Clean Out Your Startup Group
Optimize Your Swap File
Optimize Your Disk Cache (and Get a UPS!)
Tune the Hidden Windows Disk Cache Settings
Tune Your CD-ROM Caching
Turn Off CD-ROM Autoplay
Optimize Your Multimedia Settings
Turn Off Power Management
Take Down Your Wallpaper
Use Hotkeys Instead of Desktop Icons
Lose the Screen Savers
Lose the System Sounds and Desktop Schemes
Turn Off the Windows 98 Animations
Turn Off Windows 98 Tooltips
Find the Fastest Settings for Your Video Card
Enable Your Hard Drive's DMA Setting
Shrink Your Start Menu
A Primer on Regedit and the Registry
Turn Off Windows 95's Window Animation
Turn Off Pause in Menus
Turn Off Click Here to Begin
Tune Windows 9x to Your Modern CD-ROM Drive
Recover That Wasted CD-ROM Cache Memory
Improve the Windows 9x Server Template Even More
Reduce Filesystem Fragmentation

Check Your Free Disk Space

I'll talk about how to minimize the importance of checking your free disk space in Chapter 3, Disk Optimization, but I'll shoot for the quick fix for now, because if you're having this problem, the implementation of every other trick is going to be downright painful. If the free space on a hard disk falls to below 10% of the size of the drive or 100 MB (whichever is smaller), performance slows to an absolute crawl. The easiest way to quickly check your available disk space is to double-click My Computer, hit F5, and click once on C:. The drive's capacity and free disk space will appear in the lower pane of the window.

If the space is too low, you need to do some quick-and-dirty housecleaning. Leaving the My Computer window open, Start > Find > Files or folders > *.tmp will probably turn up some temp files. Ctrl-A-Shift-Del-Enter will banish them without sending them to the Recycle Bin. To see how much disk space you have freed, click back on the C: icon in the My Computer window and hit F5.

CHK files also tend to clutter up hard drives--these are the lost clusters ScanDisk finds and saves unless told otherwise. Start > Find > Files or folders > *.chk may turn up some more candidates for deletion. Ctrl-A-Shift-Del-Enter disposes of them properly.

If you're still short on space, try Start > Run > c:\Windows and, while holding down the Control key, click once on the folder labeled Temporary Internet Files and once on the folder labeled Cookies. If you have settings that are saved in cookies, such as logon IDs for password-protected web sites, don't select Cookies. Shift-Del will throw away your Internet Explorer cache (IE uses an inordinately high 10% of your available disk space for cache by default) and your Internet Explorer cookies. Internet Explorer will rebuild this folder the next time it's launched.

If you use Netscape Navigator or Communicator instead of Internet Explorer, try to find your Netscape cache. I suggest Start > Find > Files or Folders > Named > cache > Find in > c:\Program Files\Netscape > Find Now. When you find it, click on it once, then hit Shift-Del.

Should all of this prove inadequate, proceed to the next two tips, which also deal with free disk space.

Uninstall Unneeded Applications

To see what's installed on the system, run Windows 9x's native uninstallation program by pressing Start > Settings > Control Panel > Add/Remove Programs. If you have seldom-used programs there, uninstall them. You can always reinstall a seldom-used program from the original CD or floppy disks if it turns out you need it later.

Installed applications will slow down your hard drive even if you aren't running them. This phenomenon is described in detail in Chapter 3, but as a general rule, the fewer applications you have installed on your system, the faster it will run. Leaving software installed just because you think you might need it someday is usually a bad idea. When programs used to come on stacks of ten or more floppy disks, this made more sense. But now that programs come on CD-ROM and install in a minute, it just doesn't make much sense to leave those programs you only run once a year installed all the time.

We also buy some packages that we use only once--tax preparation software comes to mind. Once your tax return is filed, uninstall your tax preparation software. The uninstall program will leave your data files alone, so if you reinstall the software, your return is still there. This is good, because it means next year's edition will be able to find your return to import data, and in the case of an IRS audit (gulp), you can reinstall and the program will find your data.

Other examples of good candidates for uninstallation would include games you rarely play anymore and previous versions of software packages you've upgraded. Chapter 5, Utilities, will deal with the problems of disk bloat in more detail.

If you have a small number of applications that you rarely use but never know when you'll need them, you might want to consider installing a second copy of Windows and installing them under that copy, keeping a cleaner copy for general use. This advanced technique is covered in Chapter 10, Clean Windows Installation.

Get Rid of Excess Fonts

Windows 9x is better at font management than Windows 3.1 was, but this platform still has difficulty managing large numbers of fonts. Fonts consume disk space and chew up CPU cycles whether you're using them or not. If you have hundreds of fonts, either get a package like Adobe Type Manager Deluxe that lets you group and categorize them for special projects, or group and categorize them into folders yourself, dragging their contents into your fonts folder as you need them. As long as fonts aren't in the C:\Windows\Fonts directory, they're just occupying disk space, and they're not consuming any CPU cycles.

For general home use, the default set of fonts installed with Windows is adequate: Arial, Courier New, Marlett, Symbol, Times New Roman, Verdana, Wingdings, and Webdings. (Windows 95 doesn't come with Marlett, Verdana, and Webdings by default.) Having an additional serifed font (a font with feet and ears like Times New Roman) and an additional sans-serif font (a clean font like Arial) won't drag your system down a noticeable amount, and using fonts other than Arial and Times will give your documents a distinctive look. Chances are you will want a handful of novelty fonts--those fun fonts you use on greeting cards--as well. But by all means, if there's a font on your system that you don't like and can't imagine using, get rid of it. Windows 9x can handle a few dozen fonts without much difficulty, but hundreds of fonts will take its toll.

If you have a low-resource system like an old 486, or if you are short on disk space, strip out any unused fonts, including rarely used bold and italic variations of fonts you do use. Windows can generate draft-quality bolds and italics from the base font when needed. And the only people likely to need the Symbol font are mathematicians, college students living in Greek houses, and students studying the Greek language. If you don't fall into any of those three categories, you can ditch Symbol as well.

Defragment Your Hard Drive

After you maximize your free space, you want to defragment your drive using Start > Programs > Accessories > Disk Defragmenter. Defragment whether Windows says you need to or not. There are strategies for defragmenting, third-party utilities that do a better job, and strategies for reducing the frequency with which you will need to defragment your drive. These are covered in Chapters and . For now, blind optimization is far better than no optimization.

Defragment your drive after you remove any large quantity of data from your hard drive, as well as any time you install software. You should also make a habit of defragmenting your drive once a month.

The need to defragment a drive is one point that the popular computer press has done a good job of driving home. The reasons why fragmentation happens and the reasons it can slow your computer down are discussed in detail in Chapter 3.

Lose autoexec.bat and config.sys

Chapters and discuss the creation of optimal configuration files, but because the configuration files most PCs come with from the manufacturer are worse than no configuration files at all, rename AUTOEXEC.bat to AUTOEXEC.XYZ and rename CONFIG.bat to CONFIG.XYZ and restart. If you don't run DOS programs, this trick is a double blessing: you speed up your system, and you don't have to change the way you work at all. Renaming the files like this allows you to keep the files for reference, but keeps the system from finding them and using the configuration data in them. You could use your initials as the extension; I suggest using the letters "xyz."

Be sure to restart immediately after you do this procedure, because it can have a dramatic effect on your system speed. It can also prevent the problem described in the next section.

Make Sure Your System Is Using 32-bit Drivers

If the system is much slower than it should be, there's a good chance that Windows isn't using its native 32-bit drivers for disk access. Another common symptom of this problem is a nonfunctioning CD-ROM drive. To check for more symptoms, press Start, then proceed to Settings > Control Panel > System > Performance. If you see a message that says certain drives are using MS-DOS compatibility mode, you have a problem. Switch over to Device Manager > Hard Disk Controllers. If you see yellow exclamation points, you may have one very common (but perplexing) Windows 9x problem. To fix it, press Start, then proceed to Run > Regedit, then Ctrl-F-NoIDE-Enter. We'll talk about Regedit in a little bit more depth later in this chapter. For now, if Regedit comes back with a key labeled NoIDE highlighted in blue, right-click on it and select Delete. Now restart immediately. You should see an immediate, dramatic improvement in disk performance.

Clean Out Your Startup Group

There may be programs Windows is loading at startup that you don't need. Right-click Start > Explore > Programs > Startup. Take a look around at the items in your Startup folder. Perhaps two of the most common are Microsoft Find Fast and Office Startup. Both are components of Office 95 and Office 97. Find Fast indexes the files on your hard drive at certain intervals. This process speeds up the Start menu's Find operation somewhat and allows you to search the text of your files, but at the expense of making Pentiums feel half as fast as their rated speed. If these features are less important to you than system speed, remove Find Fast. Office Startup makes Office load slightly faster, but Office can run without it, and Office Startup consumes memory. Unless you use your computer almost exclusively for Office-based applications, remove Office Startup. If there are other programs running at startup that you don't need to load automatically, get rid of them.

There are two other places from which programs can run at startup. Press Start > Run > sysedit > win.ini > Search > Find > run= > Next. Step through and delete (or comment out by preceding with a semicolon) any line that runs a program you don't want starting automatically. Startup programs can also hide in the registry. Press Start > Run > regedit. Navigate to HKEY_LOCAL_MACHINE \SOFTWARE \Microsoft \Windows \CurrentVersion \Run and examine any RunOnce, RunServices, and RunServicesOnce keys.

Digging around in WIN.INI and in the registry can be cumbersome, and putting deleted programs back if necessary is even more cumbersome. For more on Startup Manager, see Chapter 5.

Optimize Your Swap File

First things first: forget every piece of advice you've ever heard or read about virtual memory. There's a lot of correct information about it out there, but there's also a lot of dubious advice. You've probably heard something about multiplying the amount of memory you have by three and using that figure. Forget that. Generic, one-size-fits-all advice about virtual memory doesn't work for your system. The amount of memory (and the amount of virtual memory) you need depends on what you do with your computer--not on what some hotshot computer journalist does with it.

Windows' default method of handling virtual memory works well for exactly two kinds of people: those who have far too little memory in their systems (8 MB or so), and those who run voice recognition programs like Dragon Naturally Speaking or IBM ViaVoice. If you fall into either of these categories, proceed to the next section.

If you're still with me here, you need to figure out how much virtual memory you require. So hit the Web and go to http://www.sisoftware.demon.co.uk/sandra, where you can download an outstanding utility called SiSoft Sandra Standard. This is a free utility that gives a host of invaluable information about your system. Install Sandra. Now, think for a minute. Picture your computer at its worst--the hourglass sitting there taunting you, the hard drive grinding incessantly, the computer acting like someone poured thick molasses into it. Maybe it's when you have your web mail client, your instant messaging client, and your MP3 player all open and active at once. Maybe there's one game in your library that takes forever to load and then trudges along jerkily. Whatever it is, find that configuration.

Maybe you're lucky and you haven't found that configuration yet. If that's the case, I'll tell you how to make it. If you're a gamer, load a game, then switch back to Windows Explorer and launch another. Switch back again and launch another. Repeat until you've either loaded every game you own or you can't stand your computer's slowness anymore.

If you use your computer for personal productivity, open your web browser and your email client. Open Solitaire or Minesweeper or some other simple game. Run your spreadsheet program and open your biggest, nastiest spreadsheet file. Now open your word processor and load that 25-page paper you had to write last term (or whatever your biggest word processing document happens to be). Open your personal finance program. If you have a desktop publishing program, open it along with its biggest document. Open your photo editing program and load your biggest picture into it.

If your system isn't crawling by now, congratulations. You have absolutely too much memory, and you get to proceed to the next section and ignore everything else I have to say here. And if you're thinking you never have this much stuff open, don't worry about it. Someday you'll strain your computer--we're getting it ready for that day. We're trying to simulate the absolute toughest load you can throw at your computer.

Now that your computer is begging for mercy, launch SiSoft Sandra (Start > Programs > SiSoft Utilities > SiSoft Sandra 99 Standard). Hit OK to clear its startup tip. Double-click the icon labeled Windows Memory Information. Look at the heading labeled Current Swap File, then look at the heading labeled Free Page File. Subtract Free Page File from Current Swap File, and you now know the amount of virtual memory you need. Write down that number because you'll need it in a few minutes. Hit OK, then close Sandra, then close that obnoxious number of programs I had you open. Now that you have a clean system with no programs running, go into Control Panel and open the System applet. Proceed to Performance > Virtual Memory > Disable Virtual Memory. Windows will complain about reduced performance and other assorted paranoia. Ignore it. We need Windows to start without a swap file, because Defrag cannot defragment the swap file, nor can it move it. So we turn off virtual memory in order to get the swap file out of the way. We'll re-create it after we're finished.

After rebooting, run Start > Run > Defrag. Go ahead and defragment all of your hard drives, even if Windows says they are 0% fragmented. Windows' definition of 0% fragmentation is awfully lenient. If the files themselves aren't fragmented, the disk can have gaps in the free space and still be considered 0% fragmented. A disk meeting this definition of zero fragmentation won't stay unfragmented for long. We'll talk a whole lot more about defragging in Chapter 3.

Should Windows fail to start properly, reboot and hit F8 at the "Starting Windows 9x" message. Select Safe Mode from the boot menu. Safe Mode will always run, but defragmentation in Safe Mode is much slower than normal.

Now that your hard drive is defragmented, reenter Control Panel > System > Performance > Virtual Memory > Let me specify my own virtual memory settings. Enter the number you got from running Sandra for the minimum and maximum values.

These settings work very well for the majority of applications. Windows spends less time trying to figure out how much virtual memory it's going to need--it usually does a poor job anyway--and the CPU spends its time instead concentrating on real work.

Optimize Your Disk Cache (and Get a UPS!)

The only reason I can think of for using Windows' default disk cache settings is fear of data loss should the power go out. Windows keeps the last few filenames and directory names it has accessed in memory to improve performance. The default settings use about 16K; the best settings (without registry hacks) use 40K. Unless you have less than 8 MB of RAM, this is just about the best investment of 24K of memory you can make. Admittedly, this change does make the system more vulnerable to power outages, so you should have an Uninterruptible Power Supply (UPS) if you choose to use this setting. This isn't a big deal--a UPS makes your system crash less and last longer by supplying it with consistent power, and UPSs are cheap. I frequently see low-end APC UPSs, which are fine for home use, on sale for $50.

Go to Start > Settings > Control Panel > System > Performance > File System > Typical Role of this Machine > Network Server. Windows will now store the last 2,729 filenames and the last 64 directory names it's used. Of the well-known tips, this one tends to make the most noticeable difference.

The original August 24, 1995 release of Windows 95 and the OEM Service Release 1 (Windows 95A) both contain a bug in this setting that actually causes the network server settings to dramatically slow the machine down.

To find out what version of Windows 95 you are running, go to Control Panel > System > General. Under a heading labeled System, Windows will tell you its version number. If the version is Windows 95 4.00.950 or Windows 95 4.00.950 A, you need the bug fix, presented later in this chapter; it involves changing the Windows registry.

Tune the Hidden Windows Disk Cache Settings

This trick is not as well known. You can force Windows to allocate a fixed amount of memory for disk caching, or to set a floor or ceiling on the amounts it uses. To do this, press Start > Run > SYSEDIT. Click on the window labeled C:\Windows\System.ini. Near the bottom of the file, there is a line containing [vcache]. Under [vcache], add the following lines:

MinFileCache=4096
MaxFileCache=4096

The values you include for these two settings will vary. If you have a Pentium-class processor, set MinFileCache to 1/8 of your total memory or 1024, whichever is lower, and set MaxFileCache to 1/4 of your memory or 16384, whichever is lower. If you have a 386 or 486 processor, set MinFileCache and MaxFileCache to the same value--either 1/4 of your memory if you have 16 MB or more, or 1/8 if you have less.

Windows uses its VCACHE to mirror data on your hard drive. It takes only a little bit longer to read 128K off the disk than it takes to read 64K, so when Windows asks for 64K, the VCACHE will go ahead and read more data than Windows asks for. And if Windows asks for the next piece, VCACHE can provide that data from RAM instead of from the disk. Also, if you ask for a piece of data once, there's a decent chance you'll ask for it again, so VCACHE holds whatever data you've loaded last for as long as possible.

To illustrate this principle, try restarting your computer, then loading a large application like Microsoft Word. Count off the seconds before it loads--an unscientific one-one-thousand, two-one-thousand will suffice for this illustration. Now immediately close Word and load it again. This time, it will load much more quickly, because much of Word is loading from RAM rather than from disk.

Long ago, disk caches were a fixed size. You told the system how much memory to use to cache the hard drive, and that memory couldn't be used for any other purpose. Windows 95 introduced dynamic disk caching, which uses however much free memory is available for a disk cache. If you're not using much memory, you get a big disk cache. If you're using a lot of memory, Windows is supposed to use a small disk cache.

On a fast computer with a lot of memory, this is a really good idea. But slow computers may not have enough CPU time to dynamically tune their caches without affecting the other work they have to do. And a computer with 8 MB of RAM can't hold Windows Explorer entirely in RAM, so there's no point in allocating more than 1/4 of available RAM to caching. And there's no point in letting Windows constantly chew up CPU cycles to come to that conclusion.

Even if you have memory to burn, it makes sense to give Windows a floor and a ceiling, because Windows' dynamic caching often makes imprudent decisions--sometimes allocating as much as 80% of system memory to the disk cache. There are very few situations where you don't want a disk cache, but by the same token, if you are using more than about 1/4 of your available memory for disk cache, you're improving disk performance at the expense of the rest of your system.

Tune Your CD-ROM Caching

Stop--read this tip even if you don't have a CD-ROM drive. Just because you know you don't have a CD-ROM drive doesn't mean Windows does. Open Control Panel > System > Performance > File System > CD-ROM.

The conventional advice is to set the Supplemental cache size slider all the way to the right, and set Optimize Access Patterns to quad-speed or higher, regardless of the speed of your CD-ROM drive. If you make heavy use of your CD-ROM drive and you have more than 16 MB of memory, you should do this step.

If your system doesn't have a CD-ROM drive, or if you don't use the CD-ROM drive for anything but installing software or listening to music CDs, do the opposite. Slide the supplemental cache size all the way to the left, and set Optimize Access Patterns to "No read-ahead." Now Windows will allocate 64K of precious memory to caching your nonexistent CD-ROM drive. This is wasteful, but could be worse. Sometimes Windows chooses to allocate 1.2 MB to this task. This trick is absolutely essential if you are running Windows 95 or 98 on a system with 4 or 8 MB of RAM. I'll tell you how to recover that 64K of memory later in this chapter, after we talk about Regedit.

Windows' default CD-ROM drive settings don't make a whole lot of sense. Slow and fast drives alike benefit from large amounts of caching. Windows would be better off picking an arbitrary amount of memory to cache any CD-ROM drives present, and pick the amount based on the total amount of system memory, rather than on the speed of the drive. Though Windows doesn't do it automatically and you can't change the memory usage from the Control Panel, you can change it from the registry. If you have plenty of memory and you want the smoothest possible playback from CD-ROM, it's possible to tune the quad-speed settings for today's much faster drives. Since this tip requires digging into the registry, I'll talk about it later in the chapter.

Turn Off CD-ROM Autoplay

Under some circumstances, Windows 9x polls the CD-ROM drive every few seconds to see if a CD has been inserted. Depending on the nature of your system, this can make things noticeably more sluggish. You can turn this off with the Windows 95 PowerToys, but it's best to go to the source. Control Panel > System > Device Manager > CD-ROM > <name of your CD-ROM drive> > Properties > Settings. Clear the box labeled Auto Insert Notification, then click OK. If you have more than one CD or DVD device, repeat this process for each drive in your system.

Unfortunately, a small number of software titles assume you have autoplay turned on. If you turn autoplay off and then a program refuses to install or behaves erratically when you run it, try turning autoplay back on to see if the program will run.

Optimize Your Multimedia Settings

Windows 95 and 98 make some fairly absurd assumptions about the multimedia devices connected to a typical PC. Click Start > Settings > Control Panel > Multimedia > Advanced (in Windows 98, Start > Settings > Control Panel > Multimedia > Devices). Expand the view for Media Control Devices. Among these, you will find entries for VISCA VCR Device and Pioneer LaserDisc Player. If you don't have a laser disc player connected to your computer, click on its entry, hit Properties, hit Remove, and hit OK. If you're like me and 99.9% of all other computer users, and you don't have a VCR connected to your computer, do the same for the VCR device entry.

Windows 9x assumes that you have these devices connected to your computer, yet you don't want to use them. It doesn't make the same assumptions about more common hardware like CD-ROM drives and sound cards. It assumes you have them and want to use them, even if you don't. If you don't have a CD-ROM drive or you don't use it to play audio CDs, go to CD Audio Device > Properties > Do not use this Media Control Device > Remove > OK. If you don't have a sound card, remove the MIDI Sequencer Device and Wave Audio Device in the same fashion. If you're really strapped for memory and are willing to risk incompatibility with some software, you can try doing the same thing for the ActiveMovie MCI Driver and the Motion Video Device. A small number of multimedia titles and older games--especially those that stream full-motion video straight off the CD-ROM--need these features, so there's a small chance you may find you have to add them back in. But most popular game titles today don't use them, and neither do most productivity titles. Should you find yourself needing them back--you'll know you do if a program that used to work suddenly starts giving you error messages--just insert your Windows CD-ROM, then go to Control Panel > Add New Hardware > Next > No > Next > Sound, video and game controllers > Next > Manufacturer > Microsoft MCI, and select the device you need. If you need multiple devices, repeat this process for each one.

Windows 9x also installs coder/decoders (codecs) for various obsolete audio and video formats. You can remove these on an interim basis, adding them back in if you find your software uses them. Newer software is more likely to use Apple's QuickTime video standard than Intel's older Indeo® standard. You can ditch Indeo® with Control Panel > Multimedia > Advanced > Video Compression Codecs > Indeo® video 5.04 and Intel Indeo® Video Interactive 32-bit Driver > Properties > Remove > Yes > OK > OK. While you're there, you can go into the Audio Compression Codecs, and you can get rid of the Indeo® audio software. Windows 95 also installs an MSN audio codec, which you can eliminate.

If you find you need to replace any of these codecs, it's easy enough--just go to Control Panel > Add New Hardware > Next > No > Next > Sound, video, and game controllers > Next > Manufacturer, then pick the appropriate manufacturer (usually either Microsoft or Intel), and pick the codec you need to reinstall.

Turn Off Power Management

By default, Windows will shut down your hard drive after a period of inactivity. This feature can cause significant slowdowns, because your drive then has to power back up the next time it's accessed. The delay can easily be a second or more. This delay will be noticeable if your disk cache has been working well and your system hasn't had to access the drive for a long period of time, but a sudden change of events makes the system look to the drive.

The wisdom of turning off hard drives in order to save power is questionable anyway. This practice causes them to wear out much more quickly, and the amount of money you save will be pennies per year, if that--the amount of power a modern hard drive consumes is that negligible. Reducing the lifespan of a useful drive that will cost $200 to replace in order to save a dime just doesn't seem like a wise move.

In laptop computers, the situation is a little bit different since your primary concern is battery life, rather than performance or longevity. You have little choice but to use power management on your laptop; however, keep it turned off on your desktop computer.

In Windows 95, go to Start > Settings > Control Panel > Power. Clear the box that reads "Allow Windows to manage power usage on this computer." Then click on the Disk Drives tab and clear the checkbox there as well.

In Windows 98, go to Start > Settings > Control Panel > Power Management > Power Schemes > Home/office desk > Turn off hard disks > Never.

Take Down Your Wallpaper

This is usually an unpopular tip, but on anything but the newest systems, a backdrop on your desktop slows down your system by consuming memory to store it and consuming CPU cycles to redraw it. The simpler your backdrop is, the faster your system will be. And if you have a 486, by all means don't have a fancy backdrop--you have neither the CPU cycles nor the memory to spare.

In all fairness, modern CPUs and fast AGP video cards minimize this effect. The amount of speed you wring out of the typical Pentium II 450 won't be noticeable, but it can make a difference on a marginal system. I'll use wallpaper on my Cyrix MII-PR233 because it has a fast 128-bit STB video card and a boatload of RAM. But I don't even think about wallpaper on my Pentium 90 with its puny 32-bit Trident video card. That system needs all the help it can get.

If you have Windows 98 or have Internet Explorer 4 or 5 installed under Windows 95, Active Desktop permits you to use GIF or JPEG images or web pages as wallpaper. This is a serious performance drain. If you must keep your wallpaper, you can convert it into a resource-saving .bmp file and reset it as your wallpaper in one swoop by loading the image into Internet Explorer or Netscape Navigator, then right-clicking it and selecting the Set As Wallpaper option.

Use Hotkeys Instead of Desktop Icons

Many people keep shortcuts to their most frequently used applications on their desktop. In the past, I've recommended that people follow this practice. Unfortunately, having dozens of icons on the desktop slows the system down for the same reason that having desktop wallpaper does, only more so because the system frequently has to load the icons from disk when redrawing the desktop. Keep your desktop simple--if you need fast access to certain key applications and don't want to navigate the Start menu, define hotkeys instead. They're faster than double-clicking an icon, they're always available without having to make the desktop visible again, and they don't slow the system down.

To make a hotkey, right-click on the Start menu and hit Explore. Navigate to your program's icon, then right-click on it and hit Properties. Click the Shortcut tab, and click in the box labeled Shortcut Key. Hit a key that makes sense--I typically use the first letter of the application's name--then hit OK. From then on, hitting Ctrl-Alt and that letter key will launch that application.

I use my word processor to print a list of my computer's hotkeys in ten-point text--just a simple list containing each key and the program it launches--and I cut it out and tape it to my monitor.

Lose the Screen Savers

The need for screen savers evaporated in the early 1990s when monitor refresh rates increased, but people continue to buy them. There is absolutely no compelling reason to use them; from a technical standpoint, they do far more harm than good. The real danger with monitors is not the picture becoming permanently etched onto the screen; it's the phosphors wearing out from being overworked. Many screen savers have nearly as much movement as a fast-paced video game and make the monitor and CPU work about as hard as well. If your system is doing routine maintenance like scanning for viruses, checking hard disks for errors and correcting them, or defragmenting hard disks--things it should be doing automatically, and we'll cover that in Chapter 5--a screen saver interrupting those tasks will make them take much longer. If you're waiting for the computer to finish some time-intensive task like a transform in Photoshop or even a lengthy download from the Internet, the screen saver steals valuable RAM and CPU power from that task. It also creates one more task for the computer to juggle--and one more reason for it to crash. Some screen savers have been known to crash systems.

Using the Blank Screen screen saver that comes with Windows is a good idea; it doesn't use any CPU power, and it gives your monitor's phosphors the opportunity to really rest, saving wear and tear on the monitor and reducing its power consumption. If you want to protect your monitor, use Blank Screen and give it a timeout period of 30 minutes. The use of any other screen saver causes more harm than good.

Some monitors eliminate the need for any screen saver altogether. My Iiyama Vision Master Pro monitor has a power management menu. If your monitor has digital on-screen controls, it may also have its own power management. If that's the case, set your monitor to put itself in power-saving mode after 30 minutes, which allows you to dispense even with the Blank Screen screen saver.

Lose the System Sounds and Desktop Schemes

The Microsoft Plus packs for Windows 95 and 98 contain some gimmicks such as desktop themes than cause icons to spin as they're clicked. Unless you have an extremely high-end computer--as of this writing, that would be a better than 400 MHz computer with more than 64 MB of RAM--turn that stuff off. In many cases, it takes longer for the computer to spin the program's icon than it does to load and launch the program.

You also want to turn off animated cursors and system sounds, as these toys can steal large amounts of memory and CPU time. If you need system sounds to warn you of important things like critical events, program errors, or incoming mail, go ahead and use them, but refrain from assigning sounds to every event. On the majority of systems, I go into the Sounds control panel, select the schemes box, and set it to No Sounds.

I know you lose some personalization by doing these things. I know that setting the Critical Stop event to a .wav file of Peter Sellers saying, "Special delivery for you. A bomb. Did you order one?" helps you keep your sense of humor when Windows decides to crash. And I've been known to run down the canonical list of weird band names, making multimedia themes based on the music of Alien Sex Fiend and of Crispy Ambulance (heaven forbid I use a halfway calm and sane-sounding artist like Elvis Costello or Aimee Mann) for my colleagues' systems. I can also tell you that I've never seen a 300 MHz system run as slow as it did with those themes installed. At the time, that was one of the fastest computers money could buy, but it ran like a low-end 486. That's why I never put any of these themes on my own systems--only on other people's.

If you want to express your creativity without dragging down your system or alienating your friends, family, or coworkers, there are other, less expensive ways to customize your system. Try coming up with your own color schemes, or changing Windows' font sets and sizes instead. Right-click on the desktop, select Properties, and click on the Appearance tab. Use those settings to express yourself, rather than CPU-hogging cursors and sounds. You can also try playing around with Lite-Step, a replacement Windows shell (covered in Chapter 6, Replacement Windows Shells), which is almost infinitely customizable.

Turn Off the Windows 98 Animations

One of the few noticeable changes between Windows 95 and Windows 98 is the menu animation in Windows 98. That slows the computer down. It might also annoy or distract you. To turn it off, go to Control Panel > Display > Effects > Animate windows, menus, and lists.

Turn Off Windows 98 Tooltips

One of the most maddening things (to me at least) about Windows 98 are the tooltips that pop up right as I'm about to do something. If I didn't know what the close box on the program's title bar did, would I be pointing at it?

To banish the tooltips, install the Windows 98 version of TweakUI, located in \tools\reskit\powertoy on the Windows 98 CD. Right-click the tweakui.inf file and select Install to install it. You can now pick TweakUI from the Control Panel, and choose the General tab. Confusingly, the tooltips are called "Mouse hot tracking effects." Deselect that option, and Windows will assume you know what you're doing and won't annoy you when you reach for that minimize or maximize button.

Find the Fastest Settings for Your Video Card

You may be expecting me to say that the best setting for your video card is 640 * 480 with 256 colors. That's the classic advice, but unless you have an old, unaccelerated VGA or SVGA video card, that isn't the case anymore. That's good, because 640 * 480 doesn't provide enough resolution for effective multitasking, and web pages just don't look very good in 256 colors.

Since people generally don't use those low-resolution, 256-color settings anymore, video card manufacturers optimize their cards and drivers for high-resolution, high-color displays. Computer magazine benchmark programs usually test at a minimum of resolution of 1024 * 768 with 16-bit color, so video card manufacturers frequently optimize their drivers for that resolution in an effort to give the appearance of being the fastest video card. Gaming sites on the Web frequently test at 800 * 600 with at least 16-bit color, so if the video card manufacturer is targeting the gaming crowd, it may optimize for that resolution.

You can benchmark your system's video performance at various settings to determine the best one to use. But for most people, an unscientific test will suffice. If you have Windows 98, go to Start > Settings > Control Panel > Display > Effects > Show window contents while dragging. This setting gives the video card a good workout. Enable this, then drag the window around and note whether the movement is jumpy or smooth. Try different resolutions and color depths (Control Panel > Display > Settings > Colors, Screen Area), and note which setting gives the best movement.

On Windows 95, go to Start > Settings > Control Panel > Display > Plus! > Show window contents while dragging, which will have the same effect. If you don't have the Plus! Tab, you can download the Windows 95 font smoothing utility from http://www.microsoft.com/windows95/downloads to get that capability. Alternatively, just load a long document into your word processor, and see if the speed of its scrolling changes as resolution and color depth change.

Interestingly enough, I found that on some modern AGP video cards, 16-bit color is fast, 24-bit color is extremely slow, but 32-bit color is nearly as fast as 16-bit color. Your common sense and intuition aren't likely to help you much in finding the fastest video setting. Try them all, even the modes that go against your better judgment.

Enable Your Hard Drive's DMA Setting

If your disk controller is capable of direct memory access (DMA) and has the correct driver installed, you can dramatically reduce the amount of CPU power your drives require. DMA permits the controller chip to write to memory directly, rather than sending it to the CPU and making the CPU write it to memory. This feature alone doesn't do much to improve the speed of the data transfer, but it does permit the CPU to do other work while disk access is taking place, which can increase overall system speed.

Many people know to download the DMA-capable drivers for their disk controllers, but they frequently miss this step, which negates most of the benefit of having the drivers. To enable DMA, go to Start > Control Panel > System > Device Manager > Disk Drives > <any IDE drive present> > Properties > Settings > Options > Enable DMA.

If the drive or controller isn't capable of DMA, or if the installed driver doesn't support DMA, the Enable DMA box won't appear. In addition, this box probably won't appear on SCSI devices, because SCSI controllers generally use DMA by default and don't give the option to turn it off.

Shrink Your Start Menu

If you absolutely must save every last CPU cycle you can, right-click your taskbar, hit Properties, and check the box that says "Show small icons in Start Menu." This gives you a smaller Start menu, which will draw slightly faster, allowing you to cut down the time it takes to launch programs by a few fractions of a second. Or, if you're like me, you may find you like the look of the smaller Start menu better, in which case the few fractions of a second you save are just a bonus.

While you're playing with the Start menu, you might as well organize it, too. Right-click the Start menu, then click Explore. You'll probably find all sorts of things right away that think they're the most important part of your system. Three common items are New Office Document, Open Office Document, and Netscape Smart-Update. Maybe you're like me and you've never clicked on any of those. Delete them if you don't use them. The only item that appears here that you really need is Windows 98's Windows Update, which you should never delete. Now double-click on Programs. You can reorganize these items as well. For example, Netscape browsers create a folder with tons of superfluous icons. Chances are the only icon in the group that you use is Netscape Navigator. Drag it out to the Programs section, then delete the folder.

Come up with an organization scheme that makes sense to you. Maybe you want all of your 3D shooter games grouped together in one folder. Create or rename a folder and drag all of the icons into it, then delete the old ones. We all work a bit differently, so our Start menus should probably reflect that. You want to be able to quickly find the things you use frequently. It makes you work faster, and, yes, the computer spends less time drawing the menu.

A Primer on Regedit and the Registry

Regedit is the tool Microsoft ships to edit the Windows registry, which is a kind of catch-all for system settings. Regedit was intended to replace autoexec.bat, config.sys, and the myriad of .ini files in the Windows directory. These files didn't completely disappear in Windows 9x, but they are much smaller and much less important than they used to be. The registry itself is a large database consisting of two files named system.dat and user.dat.

You shouldn't casually poke around inside the registry and change things. A corrupt registry can cause programs to malfunction, or worse, it can render the system unstartable.

Since Regedit is such a powerful and dangerous tool, it doesn't appear anywhere in the Start menu. You can add it to the Start menu or to the desktop by creating a new shortcut, typing Regedit in the command-line field, and clicking OK. Or you can just go to Start > Run > Regedit. Which approach you should use is up to you--if you're technically adept and are the only person who uses your computer, go ahead and add an icon. If other people use your computer, I suggest resisting the temptation to create an icon for it.

When you launch Regedit, its window will look like Figure 2.1. Regedit resembles Windows Explorer somewhat both in feel and in concept. The folders resemble subfolders of a hard drive, so I will refer to them in the same fashion--referring to HKEY_CURRENT_USER \Control Panel\Desktop just as I would C:\Windows\System. When I say to navigate to HKEY_CURRENT_USER \Control Panel\Desktop, I mean double-click on HKEY_CURRENT_USER, then double-click Control Panel, then double-click Desktop.

Cc750359.first01(en-us,TechNet.10).gif

Figure 2-1: Launching Regedit

Just as you can create a new file by right-clicking in an empty area in Explorer and selecting New from the pop-up menu, you can create a new registry key by right-clicking in an empty area in Regedit and selecting New.

The registry's layout is a bit complicated, but some explanation makes it much more logical. The registry is divided into six major subtrees:

HKEY_CLASSES_ROOT (HKCR)

This part contains user interface information, such as shortcut settings, drag-and-drop operations, and file associations. The settings here define Windows' reaction to mouse clicks, menus, and the other fundamental things that make Windows 9x feel like Windows 9x. This branch is a mirror of HKLM\Software\Classes.

HKEY_CURRENT_USER (HKCU)

This part contains settings or preferences for the currently logged-in user. Many important performance tuning settings are located here. Unfortunately, Windows is inconsistent about which settings should be global and which settings should apply only to the current user, so if you have a networked environment with more than one user logging into a PC, you may have to do some of the optimizations for each user who logs in.

HKEY_LOCAL_MACHINE (HKLM)

This part contains generic, global hardware and software settings that apply to all users of the machine. These settings are stored in \Windows\system.dat. Because of the global nature of this subtree, optimizations performed here only have to take place once.

HKEY_USERS (HKU)

This part contains all of the data for all of the machine's users. Think of this as the permanent storage area for each user's HKCU subtree. Each user of the PC gets a separate subkey here, which is mirrored to HKCU at logon. If the system has only one user, the only subkey here is called .Default.

This branch's values are stored in \Windows\user.dat, and if profiles are enabled, in \Windows\Profiles\<login-name>\user.dat.

HKEY_CURRENT_CONFIG (HKCC)

This part is the source of HKLM. Windows 9x supports multiple hardware configurations, although this ability is seldom used except on laptop computers. Each configuration has a number, and this number is the configuration's subkey under HKCC. When Windows boots and you select a hardware configuration, that configuration is mirrored from HKCC to HKLM.

If you have multiple hardware profiles enabled on your PC--for instance, if you have a laptop with separate profiles for the office and for home--and you want to optimize it, you must perform these optimizations once in each profile.

HKEY_DYN_DATA (HKDD)

As the name suggests, this part contains dynamic data that can change. This subtree exists only in memory, not in either of the registry's files. This contains Plug-and-Play information and performance monitoring statistics.

From the standpoint of performance tuning, the only truly important registry subtrees are HKCU and HKLM. HKCC and HKU are important only because they are the source for HKLM and HKCU, but it is safer and easier to manipulate HKLM and HKCU than it is to manipulate HKCC and HKU directly.

In the following sections, I will explain the various subkeys in HKCU and HKLM, since an overview of these subtrees adds a little bit of clarification to what we are doing in the rest of the chapter. The Windows registry is much like an unfamiliar city. A map is no substitute for a lifetime spent in the city, but it helps you to understand written directions a bit better. What follows is a map of the two most important parts of the city, or registry. The written directions will follow the map.

If you want a more detailed discussion of the registry, there are several books available. Windows 95 in a Nutshell, by Tim O'Reilly and Troy Mott (O'Reilly & Associates), and its companion book by O'Reilly, Mott, and Walter Glenn, Windows 98 in a Nutshell (O'Reilly & Associates), both dedicate a full chapter to an overview of the registry from the user's standpoint. Inside the Windows 95 Registry, by Ron Petrusha (O'Reilly & Associates), goes into much more detail about the registry and how it works, and covers advanced use of Regedit from the perspective of a software developer. Experienced users wanting a more thorough understanding of the registry will benefit from consulting Inside the Windows 95 Registry.

Although performance tuning does require some spelunking into the registry, these excursions are limited to a few small areas. The important areas (from a system optimization standpoint) are noted. A brief overview of the less important areas is provided strictly for clarity--for the same reason people will usually describe nearby streets as well as the destination street when giving directions.

HKCU

HKCU contains seven top-level subkeys that define how Windows will behave. Their structure is somewhat inconsistent--merely a repository for the data the authors of Windows and whatever applications you have installed felt necessary to store someplace. This inconsistency, unfortunately, goes all the way down to the capitalization and use of spaces in the subkeys.

HKCU\AppEvents stores the associations between application events and the sounds the system plays when they occur. When you select a sound scheme in the Control Panel (something that is almost always detrimental to performance, as stated earlier), the information contained in the scheme is stored here.

HKCU\Control Panel stores some of the data from the Control Panel applets, though many Control Panel settings are still stored in .ini files. Windows 9x's inconsistencies are rarely more evident than they are here: not all changeable control panel settings are stored in HKCU/Control Panel, and not all of the changeable settings stored in HKCU/Control Panel are accessible and changeable from the Control Panel applets. There are several settings that can be changed here to improve performance.

HKCU\InstallLocationsMRU lists the last five locations from which software was installed (MRU stands for Most Recently Used). This subtree has no bearing on system optimization.

HKCU\keyboard layout is used only in multilingual Windows 95 setups, if you have defined multiple keyboard layouts in Control Panel > Keyboard > Language. Again, this subtree has no bearing on system optimization.

HKCU\Network stores network connections you have made. This subtree has no bearing on system optimization.

HKCU\RemoteAccess stores data for Dial-Up Networking, and has no bearing on system optimization.

HKCU\Software contains subkeys for each vendor whose software you have installed, knowingly or unknowingly, on your PC. Each vendor's subkey in turn has subkeys for each installed product. Software settings that change from user to user are stored here; global software settings are stored in HKLM\SOFTWARE.

HKLM

HKLM contains eight top-level subkeys, one of which is not present on all systems. Their structure is not necessarily consistent within HKLM nor within HKCU. HKCU\Software and HKLM\SOFTWARE work together, yet even their name conventions are inconsistent. Inconsistencies such as these are one of the most frustrating and intimidating aspects of the registry.

HKLM\Config is home to hardware profiles. The currently selected profile is mirrored to HKCC. This subtree has no bearing on system optimization.

HKLM\DesktopManagement is not present on all systems. It provides information for Microsoft's Desktop Management Interface (DMI). It has no bearing on system optimization.

HKLM\Enum is a good place to avoid. This subkey contains Plug-and-Play and other hardware-related information. It has no bearing on system optimization.

HKLM\hardware contains more hardware-related information, including serial port information and settings and CPU information. Again, this subkey has no bearing on system optimization.

HKLM\Network contains network settings, used heavily by Dial-Up Networking. This has no relevance to system optimization.

HKLM\Security is used by remote administration. It is poorly documented and is irrelevant to system optimization.

HKLM\SOFTWARE is very important to the system, but all of the Windows settings worth changing are actually stored in its companion section, HKCU\Software.

HKLM\System is the most important section from a system optimization standpoint. System startup, device driver, and operating system information and settings live here. The subkey CurrentControlSet has a number of changeable values.

Backing Up the Registry

Windows 98 automatically keeps five backup copies of the registry; Windows 95 keeps a single backup copy of the registry made after it was first installed. Whichever version you run, you're much better off making a backup copy before you make any changes to the registry.

Before you make any of the registry changes suggested in this chapter, restart your computer in DOS mode (Start > Shutdown > Restart the computer in MS-DOS mode > Yes).

In later chapters, I suggest making a directory called C:\Windows\backups.xyz for storing backup copies of various Windows files. We'll do that now, then we'll copy the registry into that directory:

c:\>cd c:\windows
c:\windows>md backups.xyz
c:\windows>attrib -h -r -s system.dat
c:\windows>attrib -h -r -s user.dat
c:\windows>copy system.dat backups.xyz
c:\windows>copy user.dat backups.xyz
c:\windows>attrib +h +r +s system.dat
c:\windows>attrib +h +r +s user.dat

Now that you have a backup copy, restart your computer normally.

After you've done this, a few simple commands from MS-DOS mode (not from within a DOS box in the Windows GUI!) will restore your registry from the last backup you made:

c:\>cd c:\windows
c:\windows>attrib -h -r -s system.dat
c:\windows>attrib -h -r -s user.dat
c:\windows>copy system.dat system.bad
c:\windows>copy user.dat user.bad
c:\windows>copy backups.xyz\user.dat
c:\windows>copy backups.xyz\system.dat
c:\windows>attrib +h +r +s system.dat
c:\windows>attrib +h +r +s user.dat

Restarting will restore your computer to its last good state.

Since these last few tips require Regedit unless you are willing to install Microsoft's PowerToys, they are slightly more difficult to implement. The last two cannot be implemented with PowerToys, though various freeware programs can manipulate them. These tips scare liability lawyers more than they should scare you, however. As long as you exercise caution, don't rush, and follow the instructions exactly, you will cause no harm to your system. Even if you do make a mistake, a backup copy will get you back up and running. Do make sure you make a backup copy, because usually the only way to revive a system with a corrupt registry and no backup copy is to reinstall Windows entirely, or restore from a backup copy as described in Chapter 1.

Turn Off Windows 95's Window Animation

By default, Windows 95 makes its windows explode into and out of the taskbar. This animation eats up CPU time, especially on computers with slow processors and/or slow video cards, and for some people it's distracting. To turn this feature off, launch Regedit. Navigate to HKEY_CURRENT_USER \Control Panel\Desktop\WindowMetrics. Look for an entry titled MinAnimate. If it's not present, right-click an empty spot in the window and select New\String Value. Type MinAnimate and hit Enter. Now double-click on MinAnimate, delete its default value of 0, and Enter a value of 1. This change requires you to restart the system.

If you're not comfortable playing with the registry, download the Windows 95 PowerToys, which permit changes to this value. This tip is unnecessary in Windows 98, which allows you to turn off animation from the Effects tab of the Display Control Panel, as described earlier in this chapter.

Turn Off Pause in Menus

Unless Internet Explorer 4 or 5 is installed, Windows 95 pauses for an instant before it displays the contents of its menus. The only explanation I can think of for this is dramatic effect, and if I wanted drama, I'd go to the theater. To turn this off, open Regedit, navigate to HKEY_CURRENT_USER \Control Panel\Desktop. Look for an entry called MenuShowDelay. If it's not there, right-click an empty spot in the window and select New\String Value. Type MenuShowDelay and press Enter. Now double-click MenuShowDelay, and give it a value of 1. The start menu, taskbar, and menus will now be much faster.

Internet Explorer 4 and 5 both disable this key, so changing this key has no positive effect on Windows 98 systems or Windows 95 systems with a recent version of Internet Explorer.

Alternatively, you can change this setting with Microsoft's Windows 95 PowerToys, if you prefer not to dive into the registry.

Turn Off Click Here to Begin

The pre-Internet Explorer 4 Windows 95 also shoots an animated arrow across the taskbar at bootup, pointing at the Start menu, and telling you to click here to begin. Most of us already know to do this, and those who don't usually figure it out pretty quickly. This is little more than a distraction on newer PCs, but on slower machines, this process can interfere with the launch of your first program if you try to navigate the Start menu while the animation is still playing. You can upgrade your CPU and video card, or you can just turn off the useless fluff. To do that, open Regedit and navigate to HKEY_CURRENT_USER \Software \Microsoft \Windows \CurrentVersion \Policies \Explorer. Look for a value titled NoStartBanner. If it's not present, right-click a blank area and select New\Binary Value. Type NoStartBanner and hit Enter. Double-click NoStartBanner, and change its value to 01. This change requires a reboot to take effect.

Tune Windows 9x to Your Modern CD-ROM Drive

Like the file system settings for the computer profiles, the CD-ROM access patterns are stored in the registry, so we can modify them. (Unfortunately, Windows doesn't dynamically allocate memory to CD-ROM caching like it does to disk caching.) All the control panel's System applet does is write predefined values into the registry. To fine-tune performance, we can just overwrite those values manually with our own values.

Start Regedit (Start > Run > Regedit), and navigate to HKEY_LOCAL_MACHINE \System \CurrentControlSet \control \FileSystem \CDFS. There, you will find two keys named CacheSize and Prefetch. These can be stored as DWORD values or as binary values--the easiest way to tell is to double-click on the entry and look at the resulting dialog box. If it says, "Edit DWORD value," it's a DWORD key, whereas if it says, "Edit Binary value," it's a binary value.

The value you should use for CacheSize depends on how much memory you're willing to dedicate to the CD-ROM cache. This will require some experimentation with your favorite CD-ROM titles, since some titles benefit very little from these settings, while others benefit a great deal. You want to increase your values enough to make a noticeable difference, but unless you have more than 64 MB of RAM, you probably don't want to go dedicating over 4 MB of memory just to a CD-ROM cache.

The CacheSize parameter tells Windows how many 2 KB pages to use for caching the CD-ROM drive. Table 2-1 gives a list of suggested values, containing a page count in decimal, along with the memory usage of each setting, and the binary and DWORD values that implement each setting.

Don't let the binary values confuse you if they don't look like the ones and zeroes you remember from using the binary system in math class. The registry stores its binary values in hexadecimal (base 16, using the numbers 0-9 and the letters a-f) instead of binary. Hexadecimal translates much more quickly and easily into binary than does our decimal (base 10) numbering system, and it's much easier to type than binary.

Table 2-1 CacheSize Parameter Values

Page Count

Memory Usage (in KB)

Binary

DWORD

619

1238

6b,02,00,00

0000026b

1238

2476

d6,04,00,00

000004d6

2476

4952

ac,09,00,00

000009ac

Table 2-2 provides a list of prefetch values. The prefetch value is slightly higher than the amount of memory in kilobytes that Windows will use to cache the CD-ROM drive, but you can make a quick estimate of how much memory Windows will be using by adding the CacheSize and Prefetch.

Table 2-2 Prefetch Parameter Values

CD-ROM Speed

Decimal

Binary

DWORD

4x [Default]

228

e4,00,00,00

000000e4

8x

448

c0,01,00,00

000001c0

16x

896

80,03,00,00

00000380

24x

1344

40,05,00,00

00000540

32x

1792

00,07,00,00

00000700

These are suggested values for the given drive speeds, but feel free to move up or down the scale as available memory permits. Your old 4x drive would benefit from the 32x parameters if you have the extra memory to dedicate to it. The faster drives benefit more, but if you have some games that use the CD-ROM drive extensively, go ahead and use large CacheSize and Prefetch values.

Recover That Wasted CD-ROM Cache Memory

It's possible to use the principles from the previous section to recover the 64K of memory that Windows insists on using to cache your phantom CD-ROM drive on CD-less systems--or to save memory on systems that have CD-ROM drives that are rarely used. Simply open Regedit (Start > Run > Regedit), navigate to HKEY_LOCAL_MACHINE \System \CurrentControlSet \control \FileSystem \CDFS, and zero out the value for Prefetch.

The best way to keep Windows from wasting memory on low-RAM systems is, of course, to never give it the opportunity.

Fix the Windows 95/95A Filesystem Bug

Out of the box, Windows 95 and 95A store the wrong number of paths and files in the Network Server template. This causes greatly reduced performance if you select this template.

To fix this bug, you need to load Regedit by going to Start > Run > Regedit and then hitting Enter. Navigate to HKEY_LOCAL_MACHINE \Software \Microsoft \Windows \CurrentVersion \FS Templates\Server. The values for NameCache and PathCache are reversed. Double-click NameCache, delete the first two numbers, and type A9 0A. Next, double-click PathCache, delete the first two numbers, and type 40 00. Now close Regedit and restart your computer.

Improve the Windows 9x Server Template Even More

If you have an uninterruptible power supply and any version of Windows 95 or 98, go ahead and throw some more memory at the disk speed problem. Follow the same procedure as in the previous section, but instead of typing A9 0A, type 52 15. Instead of typing 40 00, type 80 00. If you have more than 32 MB of RAM and a UPS, enter A4 2A in place of A9 0A, and 00 01 in place of 40 00. As I've said before (but it never hurts to say it again), a UPS is a good investment for reasons other than this--in the event of a power failure, you get a few minutes to gracefully shut your system down, which will prevent data loss. And the UPS will ensure your system gets cleaner power, making it crash less frequently.

Reduce Filesystem Fragmentation

There is a trick commonly passed around online as a way to optimize the filesystem for multimedia applications. The standard advice is to select Start > Run > Regedit, then navigate to HKEY_LOCAL_MACHINE \System \CurrentControlSet \control \FileSystem and go to New > DWORD > ConfigFileAllocSize. Then double-click > Decimal > 512. This trick is more of a placebo than anything else, as the default setting is 500.

This setting simply tells Windows how much free space, in kilobytes, it should look for when writing a new file. If all you do is work with large files, such as audio and video applications, you will want a large setting, such as 1024.

If you work with a lot of small files--for instance, if your primary uses for a computer are word processing, email, and gaming--you might be better served with a smaller number because your typical files will be much smaller than the default 500 KB, and Windows won't waste its time looking for a block of free space larger than your typical file size.

For most purposes, the default setting of 500 KB is fine. But if you want a super-tuned system, here's how to go about finding an appropriate setting for this entry. Go to Start > Run > Command, which will open a command prompt. Enter this single command:

c:\>dir c:\ /w /s

This command forces Windows to run through and list every file on your hard drive. We're interested in the last statement it makes--the file totals. Divide the total number of bytes used by the total number of files, then divide that number by 1024 to get an average file size in kilobytes. On one of my systems, I get a total of 9,494 files, occupying 4,228,611,074 bytes. That's an average file size of about 435K. On another one of my systems, where my usage habits are different, the average file size is only 137K.

To find a value for this registry entry, divide your average size by 32, round up to the next whole number, then multiply by 32 again. So rather than use a minimum file size of 137K, I would specify a size of at least 160K. On my other system, a size of 448K is theoretically more appropriate.

If your average file size is larger than 500K, you definitely want to adjust the default number upward.

I'm not so sure that I would want to change this setting on either of my systems described here, however, since it's far better for this value to be too large than too small. After all, looking for a 160K block to write a 600K file will result in fragmentation. If there's a large disparity between your average file size and the 500K default--such as there is on my system with an average file size of 137K--you can speed disk writes slightly by adjusting this setting downward, as long as you're defragmenting your drive frequently.

That's it for the classic tips. These are the easiest tricks to implement, since they don't require much digging into the system. A few minutes in the Control Panel can quickly implement the majority of these tricks on any system. But there are still plenty of things you can do to make Windows run faster: they just require a more thorough understanding of the systems at work below the pretty graphical interface.

About the Author

David L. Farquhar graduated from the University of Missouri with a degree in journalism and has been working as a systems analyst ever since. He has also been a weekly computer columnist for the Columbia Missourian newspaper. When not working on or writing about computers, Dave is a diehard Kansas City Royals fan, sound technician, Bible study teacher, and fiction writer.

©Copyright 2000 O'Reilly & Associates

We at Microsoft Corporation hope that the information in this work is valuable to you. Your use of the information contained in this work, however, is at your sole risk. All information in this work is provided "as -is", without any warranty, whether express or implied, of its accuracy, completeness, fitness for a particular purpose, title or non-infringement, and none of the third-party products or information mentioned in the work are authored, recommended, supported or guaranteed by Microsoft Corporation. Microsoft Corporation shall not be liable for any damages you may sustain by using this information, whether direct, indirect, special, incidental or consequential, even if it has been advised of the possibility of such damages. All prices for products mentioned in this document are subject to change without notice. International rights = English only.

International rights = English only.

Link
Click to order


Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.