Does adding more RAM to your computer make it faster?
Introduction to Does adding more RAM to your computer make it faster?
Up to a point, adding
RAM (random access memory) will normally cause your computer to feel faster on certain types of operations. RAM is important because of an
operating system component called the
virtual memory manager (VMM).
Medioimages/Photodisc/Getty Images
RAM eliminates the need to "swap" programs in and out. |
When you run a program such as a word processor or an Internet browser, the
microprocessor in your computer pulls the
executable file off the hard disk and loads it into RAM. In the case of a big program like Microsoft Word or Excel, the EXE consumes many
megabytes. The microprocessor also pulls in a number of shared DLLs (dynamic link libraries) -- shared pieces of code used by multiple applications. The DLLs take many more megabytes. Then the microprocessor loads in the data files you want to look at, which might total several megabytes if you are looking at several documents or browsing a page with a lot of graphics. So a big application can easily take 100 megabytes of RAM or more. On my machine, at any given time I might have the following applications running:
- A word processor
- A spreadsheet
- A DOS prompt
- An e-mail program
- A drawing program
- Three or four browser windows
- A fax program
- A Telnet session
Besides all of those applications, the operating system itself is taking up a good bit of space. Everything together may need more RAM than your machine has. Where does all the extra RAM space come from?
The extra space is created by the
virtual memory manager. The VMM looks at RAM and finds sections of RAM 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. If you have a very small amount of RAM (say, 256 megabytes), 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 2 gigabytes 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, many compilers, most film editing and animation packages) need tons 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!