86

Let's say I have a computer with 16 GB of memory. If my computer is usually only using about 4 GB and never reaches 8 GB, is it any faster than a computer with only 8 GB of (the same type of) memory? Would my computer run equally fast by removing the other half of the 16 GB leaving just 8 GB?

8
  • 17
    Part of the difficulty of this question is that "in use" is difficult to define for any modern operating system with virtual memory and memory-mapped files. For example, is the code ("text") segment of an executing program "used" or "cache"? Jul 23, 2014 at 17:38
  • 5
    Different operating systems manage memory differently. No operating system has been indicated in the question. The term "is use" can also mean different things. Bad question, even worse answer chosen.
    – Jason
    Jul 23, 2014 at 21:59
  • The smaller memory is potentially faster, since there's less load on the memory address drivers. In practice, though, I doubt that the clock speeds are adjusted to take this into account, so there'd be no difference. (This is assuming the "extra" RAM would just sit there like a lump and not somehow be put to use.) Jul 23, 2014 at 23:03
  • 3
    This question really needs a definition of "in use". Every answer (as the currently accepted) that claims cache tells about a use of memory. This is probably the more usefull definition, but separating different uses of memory would be helpfull. I assume we might not want to discuss if completely unused memory is helping...
    – Nanne
    Jul 24, 2014 at 13:55
  • Also note that that having the extra ram stick itself makes it faster, since both should be able to be accessed in parallel.
    – Tyzoid
    Jul 25, 2014 at 12:59

10 Answers 10

113

Yes, because the operating system can use the extra RAM as disk cache, which speeds up access to data on disk.

Extra RAM won't make CPU-bound computations (not involving much disk I/O) faster, though.

20
  • 31
    Any RAM that isn't being used for other purposes. (Unless you have more RAM than disk space, which is unlikely.)
    – Wyzard
    Jul 23, 2014 at 3:05
  • 30
    Linux does. I'd be surprised if Mac OS didn't do the same. It'd be silly not to.
    – Wyzard
    Jul 23, 2014 at 3:10
  • 9
    "Doesn't show" where? Run free on a Linux system and look at the "cached" column. Some higher-level applications (such as the GNOME System Monitor) don't report cache as "in use" because that RAM is available for use by other programs; the kernel can discard caches at any time.
    – Wyzard
    Jul 23, 2014 at 3:23
  • 4
    @PTwr - in that case the OS should be caching those files and should not give that much speed up - a RAM disk might help if you are writing - but measure the speed difference to see if it is worth it
    – mmmmmm
    Jul 23, 2014 at 10:29
  • 7
    @khajvah linuxatemyram.com Jul 23, 2014 at 17:49
59

Since every operating system manages memory differently, and none was given, I will answer in the context of Windows 7.

Below is an example from a computer with 24GB of RAM. Even though only 7 GB is currently allocated as "In Use" memory, another 10 GB is allocated as "Standby" memory and contains data that may or may not be read again. If it is read, it will make your computer "faster". The "Free" memory is not being utilized whatsoever at the moment.

Resource Monitor

  • "Available" is Standby and Free memory. In other words, all the memory not currently required.
  • "Cached" is Standby and Modified memory. All the memory used for caching, with modified being the portion waiting to be written to disk before becoming standby.
  • "Total" memory is all memory except Hardware Reserved.

If you'd like to learn more about memory usage in Windows 7, TechRepublic has a great article.

3
  • So what would happen if this computer, under this load, got another 8 GB added? I suspect "nothing," but I also suspect that a user with a heavier load or longer uptime will have much more cached.
    – user49214
    Jul 25, 2014 at 21:00
  • 3
    @JonofAllTrades I'd agree. One thing the article I linked doesn't talk about is SuperFetch (a default service in Windows 7). SuperFetch loads things into memory before they're accessed. It records usage patterns in a file and takes several restarts/days to fully optimize.
    – Jason
    Jul 25, 2014 at 21:48
  • Does this also happen in Linux?
    – Casper
    Dec 15, 2016 at 7:40
16

If the operating system is only using 4GB out of 8GB, it will run no differently to a machine using 4GB out of 16GB.

The ram that is unused has no impact on the performance of the machine.

However, the ideal situation is for the OS to use almost all available RAM. The OS and applications will request what they need, and the remaining ram should be used as cache - with a portion free perhaps to avoid swapping if an application needs more ram. Cache still counts as being "used" and will appear as being used in memory free tools.

Cache will take time to build up so you won't see this at boot. If after a while, the machine is still not using more that 4GB, then perhaps it is running a 32bit OS that cannot address more than 4GB (normally).

4
  • 4
    It depends on whether you consider disk cache as "used" RAM. The Linux free program reports it both ways, for example.
    – Wyzard
    Jul 23, 2014 at 3:13
  • I think what the gui represents to a user and the actual situation can be different. RAM that is used for cache is used regardless of whether a userland tool hides that fact to the user.
    – Paul
    Jul 24, 2014 at 22:15
  • "If after a while the machine is still not using more than 4GB..." -> Again, disk caching is great but it will not really fill up all your free RAM if you have lots of stuff that can be cached from disk -- it only caches what you've actually used and now are not, which probably does not amount to more than a couple of GB unless your normal activities include copious amounts of photoshop, etc. or the computer is a busy server with a lot of static files.
    – goldilocks
    Jul 25, 2014 at 13:07
  • @goldilocks Obviously "after a while" is vague, but intends to mean "after such duration that Windows and apps have had cause to load enough data that would exceed 4GB". My usage is fairly routine and exceeds this routinely. The point being that if this limit is being hit, it may be addressing constraint rather than lack of need for more cache.
    – Paul
    Jul 25, 2014 at 13:49
9

One other part to the equation is how the memory sticks are configured. Specifically, modernish motherboards support dual-channel memory which allows you to double the bandwidth between your motherboard and memory; if you had paired memory and you took out 1 of each pair, you've lost this and so your memory access when doing a lot of memory transfers will be diminished which should result in operations taking longer. (Contrariwise, if you happened to have 8 Gig's of faster memory paired with 8 Gigs of slower memory and were only using 8 Gigs, taking out the 8 gigs of slower and repairing the faster should allow you to run faster since you still get dual channel but not it doesn't need to slow down to the slowest memory)

But, in general, the caching stuff mentioned in other answers is going to be a bigger contributor to overall performance.

3

Removing half of your 16GB of memory will slow your computer down.

This holds even if you never use close to 8GB of memory.

The software side of it is covered in other answers and boils down to the OS chosing to use RAM rather than disk.

However you might see a hardware driven hit to performance by halving the amount of RAM available. The reason is that RAM buses uses multi-channel architecture, meaning that the computer can transfer data between multiple RAM modules simultaneously.

Probably you computer is dual channel. In which case you can remove 2 out of 4 4GB RAM modules with no hardware mandated performance impact. However removing 1 out of 2 8GB RAM modules will impact performace.

If you have a quad channel RAM architecture you will see a performace hit even if your ram is 4GB modules.

2

If the memory is ever maxed out or 99% you are going to lose speed because of the page file which sits on the hard disk. The hard disk can not even come close to the speed of RAM being that RAM is directly accessed by the cpu depending on bus speeds.

Windows uses about 3-4 GB idle of ram not counting other applications. I have been running 16 GB for years now and never actually needed more than 8gb. Realistically the avg PC users never uses more than 4-6 GB say for gaming. I have only seen it get close to 12 gb once when compressing a movie or doing something RAM intensive usually has to do with multimedia and multiple core CPU's would be the only way you would need more than 8gb. and yes it would run just as fast. IMO.

Idle after 1 Day uptime: enter image description here enter image description here

Idle after 2 Day Uptime: enter image description here enter image description here

The more RAM Windows has the more RAM it seems to use.

enter image description here

In terms of Windows 7 utilizing RAM to make certain process's faster here is an example.

enter image description here

Chkdsk maxing out RAM to speed up caching in turn speeds up performance and disk checking time so in this case more does in fact = faster...

2
  • 1
    Windows 7? Even with lots of stuff, I hardly go over 2G. Jul 23, 2014 at 18:22
  • The more RAM Windows 7 has the more it will use... overtime it will fluctuate due to what programs you have opened and are currently open until services and applications release the memory it will fluctuate steadily.. with regard to the actual question. Will 8GB be as fast as 16GB yes and no depending on what you are using your computer for. Under normal circumstances you should need no more than 8GB and see no real performance loss if for common uses such as gaming or web browsing.
    – MORBiD
    Jul 27, 2014 at 3:01
2

In practise the answer is more likely to be "NO" to the question as stated. The Q. says "(usage) never reaches 8 GB" and mentions "same type of memory" thus the most likely factor affecting speed (disk buffering) wont be affected. A common practical example is database servers with enough memory to buffer the complete hard disk - eg with 4GB of files and 2GB of process/system allocated memory doesn’t benefit from more than 8GB of memory.

Exceptions:

More memory can slow Hibernation - on my system with 32GB of memory and SSD disk a cold boot is significantly faster than awakening it from hibernation as it saves the whole 32GB on hibernation, but a cold boot requires much less to be read. Reducing memory would speed the system.

It Would be faster if you accessed more of the hard disk and most people have more disk usage than memory left over for buffering, so extra memory helps. Also many O/S report only part of the usage as "usage" and the rest is counted as buffering not "usage". (Linux reports usage both inclusive and exclusive of buffering).

Memory channels affect performance: [If removing memory means you reduce the number of memory channels in use then the system would slow down as Foon correctly pointed out]

[edit:] David Schwartz commented that lowering memory reduces the limits for private, modifiable memory mappings under windows. Windows apparently limits the total of these reservations to the total of memory plus swap so you can run out of this resource even though there is "free memory" reported (since real memory/swap is not allocated till a page is accessed, it is not counted as memory usage). Linux behaves differently - each process can allocate up to the the total of memory and swap size, and the total over all processes can exceed the total of memory plus swap.

11
  • 1
    You basically just assert that "no" is the correct answer but don't say why. Jul 26, 2014 at 20:34
  • This was in response to the accepted answer - I don't have the rep points to comment on it directly - sorry for the confusion. To clarify, in case it wasn't obvious, you only use as much memory for hard disk buffering as is actually read or written - if there just isn't that much disk usage, or it is never accessed, then extra memory doesn't make a difference.
    – iheggie
    Jul 27, 2014 at 0:14
  • 1
    The example I gave of the database server is an example where extra memory makes little difference - all of the disk in usage gets buffered.
    – iheggie
    Jul 27, 2014 at 0:21
  • What about the fact that more RAM means more backing store which may permit the OS to allow allocations it would otherwise refuse? Jul 27, 2014 at 6:36
  • In my example of the DB server - no difference at all since it would never refuse an allocation because of lack of free memory. What allocation would the O/S refuse if a. all the processes where in memory, b. the whole disk was already buffered in memory, c. it had free memory and d. some other limit wasn't exceeded (eg max process/buffer/addressable size limits)?
    – iheggie
    Aug 1, 2014 at 2:32
0

Memory fragmentation is another reason to have extra memory. If you have 8GB of RAM, and you tend to keeo it 80% utilized, particularly in modern use cases (with lots of memory swapping, such as from opening and closing browser tabs) you will eventually get significant fragmentation.

Adding the extra 8GB of RAM makes it more likely that the OS will find contiguous spaces of memory available, meaning less frequent reboots are necessary to avoid performance degradation.

1
  • My understanding is that memory fragmentation is something that can occur within the memory space of a process, which is virtual on typical modern systems, and that it doesn't apply to the system in general. Since physical memory is divided into pages, which are mapped individually into the virtual memory spaces of the processes, fragmentation would be a menaningless concept. Please correct me if I have misuunderstood something. Jul 26, 2014 at 6:26
0

Possibly, but not necessarily. Among other things, one of the things RAM allows a computer to do is permit application to allocate memory that they may never use. If the system doesn't have enough backing store (which includes RAM) to permit every allocation it has issued so far to consume as much memory is it possibly could, the operating system will either have to refuse those allocations or overcommit. Some operating systems never overcommit and pretty much all modern operating systems limit the amount of overcommittment they permit.

So memory that's not in use can improve performance by allowing operations that might potentially require RAM to succeed where otherwise they would fail.

-1

More ram doesn't speed up the computer. Less ram "slows" down the computer.

Computers have their physical maximum speed(this includes overclocking too) and nothing can make them faster than that.

11
  • 3
    As shown in Wyzard's answer, the "computer" as a whole, includes disk access, where more ram alows more caching and therefore speeds it up. Jul 23, 2014 at 15:23
  • Do you mean that we can increase the physical speed limit of a computer by adding terabytes of ram on it ?
    – Xtro
    Jul 23, 2014 at 15:29
  • Taking hard drives into account, yes. Jul 23, 2014 at 15:57
  • BTW, less RAM does not always slow down the computer either. The L3 cache many times slowed the computer because of cache misses. Jul 23, 2014 at 15:59
  • 2
    I find your answer tautological. Yes, the 'maximum speed limit' of the CPU is the CPU's maximum speed. Good show. However, from a practical standpoint, compared to a PC with only sufficient RAM, a PC with excess RAM will perform somewhat faster.
    – Joe
    Jul 26, 2014 at 3:35

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .