Computers use memory, also called main memory or RAM (Random Access Memory), to store active programsincluding antivirus scanners and other background servicesand the data the system is using at the moment. Data can be written to and read from RAM extremely quicklyroughly a million times faster than a hard drivebut data in RAM is retained only while the system is running. RAM costs hundreds of times more than hard disk storage, byte for byte, so RAM is not an economically practical substitute for hard disk storage.
The characteristics of RAM and hard disk storage are complementary. The hard drive stores programs and data that are not currently being used, for which large capacity and permanence are important but speed is not. RAM stores active programs and data, for which access speed is important but smaller capacity and transience are not.
That's not to say that the amount of RAM you have installed in your computer is unimportant. Far from it. If your computer has insufficient RAM to hold all of your active programs and data, it slows downsometimes dramatically. This problem occurs when the operating system must swap out active programs and data from memory to the hard drive to make room for other programs and data. In extreme cases, such as running Windows XP with several active programs in a system with only 128 MB of RAM, performance may drop to literally 10% of what it would be on a system with sufficient RAM.
Unfortunately, many commercial systemsparticularly inexpensive consumer-grade models from big-box stores and online vendors such as Dell and Gatewayare sold with insufficient RAM. We checked the Sunday supplements as we started this chapter, and found that many Windows XP systems were being offered with only 256 MB of RAM and some with only 128 MB. That's a sick joke. Windows XP requires a minimum of 256 MB of RAM to load and run just one or two programs with top performance, and it really wants much more. We recommend the following amounts of RAM for a Windows XP system:
Regard these as baseline figures, and increase them if you run a memory-intensive application or if you run many apps simultaneously. For example, we'd equip even a budget system that was to run Photoshop with at least 1 GB of RAM.
Robert recently experimented with the amount of memory in his main working desktop system, which uses one of the fastest processors available. That system often has many windows opena dozen or more instances of the Mozilla browser, several StarOffice documents, his mail client, a PIM, and so on. (Robert runs Linux, which manages memory more efficiently than Windows, but the principle is the same.)
With 512 MB of RAM, performance was acceptable (as well it should be on a system with a $1,000 processor). But boosting the RAM to 1 GB paid immediate dividends. Programs loaded noticeably faster, and the lags in switching between programs disappeared. Everything became a lot snappier. Figure 6-1 shows why. At the moment this screenshot was captured, just the top three memory-consuming processes were using about 317 MB, 149 MB, and 136 MB of RAMabout 90 MB more than the 512 MB of RAM that was originally installed on this system. About 83 MB of physical RAM remains available, and only 368 KB of the swap file is in use. This system is running happily, with essentially all of the active programs using RAM exclusively.
Boosting the memory in this system to 1.5 GB had little beneficial effect. Most of the physical memory was still being usedWindows and Linux both use all the RAM they can getand the swap file usage was near zero, but there was no perceptible performance difference between 1.5 GB versus 1 GB. That might change with a different mix of applications, but for Robert's system as he typically uses it, 1 GB of RAM is the sweet spot.
Your system also has a sweet spot, and chances are that the sweet spot is higher than the amount of memory you currently have installed. Installing more memory is one of the easiest, cheapest, and most effective upgrades you can make to an older system, or even to a new model that has insufficient memory. In the rest of this chapter, we'll tell you what you need to know to upgrade your memory and to troubleshoot memory problems.
Figure 6-1. Memory usage on Robert's primary desktop system