# Technically speaking, why does RAM increase PC speed?



## larryjr88 (Mar 9, 2008)

I can't seem to understand why more memory makes PCs run faster...

Adding RAM simply adds more slots to store bits, which basically means you can do more at once or run bigger programs, but how does more ram = faster?


----------



## Wrench97 (May 10, 2008)

If you are using all the ram installed the os has to write and read to the hard drive for data normally held in ram so if you add more ram it gets faster because hard drive writes take longer.


----------



## jarod (Oct 22, 2007)

Try to imagine this. RAM is your working table while the hard disk is your store located away from your office. If you have to get some job done, a bigger table means you can doing more things at the same time.

However if your desk is small, you will need to take and put back files into your store right. Wouldn't that take longer than to just leave the file on your table. (Bigger desk = bigger RAM)


----------



## larryjr88 (Mar 9, 2008)

Ah, I see.

I wasn't thinking in terms of hard drives at all.


----------



## LMiller7 (Jun 21, 2010)

With any modern operating system the total of code and data in use is almost always larger than the size of RAM. This is the normal situation and what the OS was designed for. The concept of keeping everything in RAM is unrealistic and not necessary for good performance.

Access to memory is anything but random. Some memory blocks are in almost continuous use during a session while others are accessed only occasionally. Others are used intensively, lapse into inactivity, then become active again.

The system takes advantage of this memory usage pattern by only keeping the more frequently accessed code and data in RAM and leaving the remainder on disk. Code is left in the original files while modified data is kept in the pagefile. This is a dynamic activity that changes frequently during a session.

The more RAM you have the larger the subset of code and data that can be kept in memory. This means less movement of data between RAM and disk, thus improving performance. Adding memory will improve performance but you will eventually reach a point of diminishing returns where the gains become very small. This point is heavily dependent on the workload.

This is the basic principle of virtual memory which is used in almost all modern operating system. The main exceptions being very small systems and those used for specialized purposes, such as industrial control. Windows has used this system since NT 3.1, released in 1993. Large computer systems have used it since the 1960's. It becomes even more important in 64 bit systems.


----------



## pallepr (Jul 11, 2009)

Don't confuse the page file with virtual memory: Virtual memory - Wikipedia, the free encyclopedia


----------



## LMiller7 (Jun 21, 2010)

I am well aware of the difference between virtual memory and the pagefile. Virtual memory includes two different concepts, paging and a virtual address space. I only mentioned the first because it is the only one relevant to the question. Maybe I could have been more clear.


----------



## pallepr (Jul 11, 2009)

Anyways, it looks like it was a spammer that brought this old thread back to life


----------



## Wrench97 (May 10, 2008)

pallepr said:


> Anyways, it looks like it was a spammer that brought this old thread back to life


You win the prize Spam it was:laugh:


----------

