Tutor Tips from ... the Computer Tutor

9 April 2006

RAM: How Much is Enough?

Does adding more RAM to your computer make it faster? Up to a point, adding RAM (random access memory) normally will cause your computer to feel faster on certain types of operations. Sufficient RAM is important because of an operating system component called the virtual memory manager (VMM).

When you run a program such as a word processor or an Internet browser, the microprocessor in your computer pulls the executable file (with the extension exe) off the hard disk and loads it into RAM. In the case of a big program like Microsoft Word or Excel, the EXE consumes about 5 megabytes (MB). The microprocessor also pulls in a number of shared DLLs (dynamic link libraries) -- shared pieces of code used by multiple applications. The DLLs might total 20 or 30 MB. Then the microprocessor loads in the data files you want to use, which might total several megabytes if you are looking at several documents or browsing a page with a lot of graphics. So a normal application needs between 10 and 30 MB of RAM to run. At any given time you might have the following applications running:

  • A word processor
  • A spreadsheet
  • An e-mail program
  • An instant messaging program
  • Three or four browser windows
  • An antivirus program
  • An antispam program
  • A changeable Desktop image program
  • Solitaire

In addition to all of those applications, the operating system itself is using a good bit of RAM, adding up quickly to 100 or 150 MB. If you are using Windows XP Service Pack 2, the amount is even greater.

What happens when the RAM required exceeds the RAM in the machine? Windows creates extra space by using its virtual memory manager. The VMM looks at RAM and finds sections that are not currently needed. It puts these sections of RAM in a place called the swap file on the hard disk. For example, even though I have my e-mail program open, I haven't looked at e-mail in the last 45 minutes. So the VMM moves all of the bytes making up the e-mail program's EXE, DLLs, and data out to the hard disk. That is called swapping out the program. The next time I click on the e-mail program, the VMM will swap in all of its bytes from the hard disk, and probably swap something else out in the process. Because the hard disk is slow relative to RAM, the act of swapping things in and out causes a noticeable delay.

How much slower are hard drives than RAM? Regardless of the type of hard drive, processor, or RAM you have, the calculations can be boiled down to simple equations. The speed of hard drives (how long it takes to store and retrieve files) is measured in milliseconds, i.e. thousandths of a second. The speed of RAM is measured in nanoseconds – billionths of a second. Doing the math, RAM is operating at speeds a million times faster than the hard drive.

If you have a very small amount of RAM (say, 128 MB), then the VMM is always swapping things in and out to get anything done. In that case, your computer feels like it is crawling. As you add more RAM, you get to a point where you only notice the swapping when you load a new program or change windows. If you were to put 512 MB of RAM in your computer, the VMM would have plenty of room and you would never see it swapping anything. That is as fast as things get. If you then added more RAM, it would have no effect.

Some applications (things like Photoshop - and other professional photo editing software, most film editing and animation packages, and video games) need megabytes of RAM to do their job. If you run them on a machine with too little RAM, they swap constantly and run very slowly. You can get a huge speed boost by adding enough RAM to eliminate the swapping. Programs like these may run 10 to 50 times faster once they have enough RAM!

How much RAM should you have? If you are running a Windows 98 or Windows ME machine, having more than 256 MB serves no purpose because these operating systems cannot use more than 256 MB of RAM.

A pc running Windows XP service pack 2 should have at least 512 MB of RAM. If the programs you use are limited to word processors, Web browsers, spreadsheets, databases, accounting programs, and solitaire, you can safely operate with 512 MB of RAM. Power users running photo editing software, mega-games, or video editing programs should have at least 1 gigabyte (GB) of RAM with a recommendation of 2 GB.

If you have a custom-built computer from a local computer shop, a RAM upgrade will be relatively inexpensive. If you have a laptop or notebook computer, it will be a bit more expensive. And, if you bought a “cheap” computer (from Dell, Hewlett Packard, or Compaq for example), the RAM these systems use is proprietary memory called Rambus, which will cost you more to upgrade.

.