What is the primary reason more RAM makes a computer faster?

1

Whilst studying for an exam I read that more RAM decreases the number of page faults. Given that handling a page fault can cost many millions of CPU cycles is this the primary reason more RAM will speed up a machine because there's enough RAM to reduce the number of page faults?

BugHunterUK

Posted 2016-04-20T12:04:14.380

Reputation: 190

>

  • What more do you want? You have posted an explanation yourself. 2) I doubt this is ontopic here, since it concerns the performance of real-world computers.
  • < – Raphael – 2016-04-20T12:09:40.603

    I wasn't sure if this was correct because researching online I just get the answers "You can open more programs". It's for a CS exam in my first year of a Software Engineering degree so I thought this would be a more relevant place for more serious answers. – BugHunterUK – 2016-04-20T12:13:32.253

    1Less page faults and more disk caching. Not very on topic here, though. – None – 2016-04-20T13:07:04.677

    Answers

    5

    First of all, you need to be specific when you say fast in computing terms. More RAM won't make your processor perform any more instructions than it can in a second (i.e. hertz).

    More RAM will however allow you to multitask faster; Access time (The time it takes to perform read/write operations) of Random Access Memory is much, much faster than a secondary storage device e.g. a HDD or SSD. Having more RAM simply means you can keep more programs in it simultaneously. The following example attempts to explain how this benefits you.

    Let's say you want to run 2 programs, Program A & Program B on your computer and both take up 1 GB of memory each. The total RAM in your computer is 1 GB. When you first launch Program A, it will be loaded up into your Computer's RAM. When you launch Program B, there won't be any room in your Computer's RAM, so your Operating System will move the contents of the RAM (i.e. Program A) to your Virtual Memory (or Pagefile) (which is on a secondary storage device) and then load up Program B into the RAM. This process is also known as swapping (or Paging). During the swap process, you'd be limited by the write speed of your secondary storage device.

    Now imagine your computer had 2 GB of RAM. When you would launch Program B, instead of having to swap the contents of the RAM into the Pagefile and hence being slowed down by the slow write speed of your secondary storage device, Program B would load directly into the RAM. This is why Alt-Tabbing from a RAM hungry application (like a video game) is a lot smoother with more RAM then it is with less.

    Aamir Khan

    Posted 2016-04-20T12:04:14.380

    Reputation: 151

    1More RAM also helps a lot if you want to run a single program that needs a lot of memory. – None – 2016-04-21T12:14:26.203

    1

    A computer's speed will definitely slow down if it does not have enough memory (Random access memory) to handle effectively all the programs running on it . RAM is one that responds with speed and sensitivity and is used to run programs it's lot more faster than the memory used in a hard drive. If a computer doesn't have sufficient RAM, Windows is compelled to use part of the much slower hard drive in place of RAM making the whole system slow. Increasing the physical RAM on your system could produce fewer page faults, even though designing your application differently will do much better than adding RAM. In general, having a smaller memory footprint, and having objects that will often move forward around the same time be on the same page will reduce the count of page faults. It can also be helpful to try to do most things you can with some bit of data in memory all at once so that you don't need to fetch it repeatedly at different times , which may cause page faults.

    Ria Muglihal

    Posted 2016-04-20T12:04:14.380

    Reputation: