17

Recently, to future-proof my computer, I've added on top of my original 4GB of memory. I brought the total memory to 8GB, and I've got no noticeable change in speed-- even when it should. I went to look into Task Manager and saw that my computer would NOT go over 4GB of memory being used, even with both Chrome and Firefox open with 20 tabs each.

After researching, everything that everyone had suggested to do was to check on how much memory was usable. Oddly enough, it says that I have 8GB of memory, and 7.74GB is usable.

The specs for my HP Pavilion g7-1075dx can be found here. It is a notebook PC with Windows 7 Home Premium 64-bit with AMD Phenom II.

My main question is: with my 64-bit computer, why is my computer not using more than 4GB of memory, even when more than 7 is usable?

EDIT: if it helps, Resource Monitor describes all the other RAM as "Standby"

  • 2
    How can you see that it is not using more than 4GB? Have you tried my other programs to test or use memory? Chrome and Firefox are not that demanding memory wise... – Mokubai Aug 31 '15 at 22:50
  • 9
    Nobody has, so far, mentioned that more RAM does not make a computer faster per se. The only time you'll see a noticeable speed bump is if your workload consumes so much RAM that Windows needs to continuously page to disk – in this case adding more RAM can definitely speed things up. But 98% of folks don't do the kinds of things that require >4GB RAM, and consequently, will never experience any tangible benefit in having all that extra RAM. – misha256 Aug 31 '15 at 23:26
  • 1
    @mattycfp There is one other possibility I know of that can limit Windows RAM usage. Is it possible that you, someone else, or some software put a LIMIT on RAM usage? Have a look at this article and follow the instructions: helpdeskgeek.com/windows-7/… – misha256 Sep 1 '15 at 0:14
  • 1
    Firefox has a 2GB limit across all tabs/processes, chrome might too. This is in addition to the normal per process limit. – JamesRyan Sep 1 '15 at 11:27
  • 6
    Having Firefox and Chrome open with 20 tabs each is definitly not enough. I have Firefox open with 157 tabs it is not even consuming 1 GB of RAM. Check while runing the games. The answer of Jamie Hanrahan is very good and detailed. For further information read on Mark Russinovich's blog post Pushing the limits of Windows. link. – sbecker Sep 1 '15 at 12:14
28

if it helps, Resource Monitor describes all the other RAM as "Standby"

"Standby" RAM is in use. It's being used as a page cache (it holds pages recently lost from all process working sets; i.e. page faults to these can be resolved without going to disk) and also for proactive file cacheing by SuperFetch.

It's considered "available" because Standby pages don't have to be written to disk before they can be assigned to some other use. Such as when a process hits a page fault that does require reading from disk, new physical page(s) must be allocated to that process, and if necessary these can be taken from the Standby list. (This is not the first choice for finding pages for this purpose, that would be the free and then the zero page list.)

In other words your system is operating as it should be.

You can force your system to get more RAM into the "in use" state easily with the command-line tool testlimit, one of the tools used in the experiments in Windows Internals. It is not part of the regular sysinternals tools but is associated with them; find it here at the sysinternals site. The download is a zip file that contains two versions, testlimit.exe and testlimit64.exe. Both are linked large-address-aware, so the 32-bit version will be able to allocate up to 3 GiB on a 32-bit machine booted with /3GB, up to 4 GiB on a 64-bit machine.

c:\> testlimit -? gives help.

c:\> testlimit -d 4 -c 512 will attempt to allocate 2 GiB of process-private virtual address space in 512 allocations of 4 MiB each. This should work fine on a 64-bit machine. On a 32-bit machine not booted with /3GB (most are not) it may error a little earlier b/c there's already a few MiB of stuff in the process (like the program itself, all the DLLs, etc.), so there is not quite a full 2 GiB available for the program to allocate.

In both cases there will be a reduction in "available" RAM, and an increase in "In use" RAM, but not necessarily 2 GiB worth because there is no guarantee that the OS will leave all 2 GiB in the process private working set. Even if it does that in the short term, you may see the process working set decrease later as the OS decides "hm, you're not really doing anything with it, other processes need it more" and pages it out.

Increase the size of the allocation "chunks" too much, reducing the number of chunks accordingly, and it will likely fail sooner as each allocation has to be virtually contiguous. e.g. try to find seven 512 MiB chunks in a 4 GiB address space and you'll likely fail.

If you use the l(eak) option instead of d(irty) the program will allocate the virtual space but will never reference it. This will not result in any appreciable decrease in "available" RAM.

(The d(irty) option takes its name from the "dirty page bit" in the x86/x64 page table entry, which is set when the corresponding virtual page is accessed with a "modify"-style operand, meaning the page's contents have been changed. This is Windows' indication that, should the page have to be evicted from the process working set, its contents have to be saved somewhere before the page can be used for something else. Pages with the "dirty" bit set go to the "modified page list" immediately after eviction; from there, Windows writes them to their respective backing stores.)

You will need to have sufficient "commit" available for these tests to work as described above (even for the l(eak) option, even though this option does not use any appreciable amount of RAM). Specifically, your "commit limit" should be at least 2 GiB (or however much you're allocating) higher than the "commit charge" before starting your test. Notice that this applies even if you're using the l(eak) option, not just d(irty). If you run into this limit you will see the "system is running low on memory" pop-ups or similar. The cure, of course, is to add more RAM and/or increase your pagefile settings.

| improve this answer | |
15

Windows can actually be configured to limit RAM usage. I don't know how or who would have configured this setting on your laptop, but you should check:

Max Ram Setting

This article has more details, but getting to the above dialog box is easy:

  1. Click the Start Icon and type msconfig.exe into the search box

    how to launch msconfig

  2. Launch msconfig.exe, click on the Boot tab, then click the Advanced Options... button, and you're in:

    msconfig boot settings dialog

  3. Either enter a sensible value, e.g. 8192 for 8GB RAM, or uncheck the Maximum memory checkbox entirely which should make Windows use all the RAM you have. I'd definitely try BOTH options.

    maximum ram setting

| improve this answer | |
  • @misha256 - Deeply confused by an answer that had very little content originally, and yes, if somebody else submitted one of the answers I wouldn't have even thought twice about the answers ( except perhaps judge the helpfulness of them slightly harsher ). – Ramhound Sep 1 '15 at 21:43
  • @misha256 if this was the issue then OP wouldn't be seeing about 4 GB in use and about another 4 GB standby. The RAM that is excluded by that option doesn't show up in "standby"; OP also would not be seeing "8GB of memory, and 7.74GB is usable". (the 256 MB not "usable" is expected due to e.g. the video card). – Jamie Hanrahan Sep 3 '15 at 0:44
10

You can use SysInternals RAMMap to see exactly what the PC does with your physical RAM. Other tools like Task Manager or Process Explorer mainly focus on virtual memory and are not the best tools for this situation.

In the "Use count" tab, you may see that large portions are unused while you have not opened many applications.

SysInternals RAMMap

This does not mean your PC will ever remain in this state. Just open a few programs and the memory will get used.

| improve this answer | |
  • The term "virtual RAM" should not be used. Also, I wouldn't say that those other tools focus mainly on virtual memory - they have plenty of counters available that show physical memory usage. – Jamie Hanrahan Sep 1 '15 at 21:45
5

Quoting from a very good article on the subject:

More memory doesn’t actually increase [a computer's] processing speed. Only a faster CPU can do that.

And in my experience that's absolutely true, in general. Unless you're running many programs at the same time and those programs have significant RAM requirements, you will hardly see any real-world benefit in having more than 4GB RAM.

People don't seem to realize that 4GB is a hell of a lot of RAM. Making Windows use more than that takes effort. You're going to have to open lots of different apps and, in those apps, open up some large files. Throw in a few tabs of YouTube videos and you might just start to see >4GB utilisation.

| improve this answer | |
  • 2
    @mattycfp I've just opened up 16 Windows on my 4GB machine, including Internet Explorer, Firefox, Word, Excel, Outlook, Skype, Visual Studio 2010 (a known RAM hog), Photoshop, Media Player, VLC, MPC-HC, plus some other random apps, and I'm switching between them doing stuff, loading documents, playing videos, everything, and my actual RAM usage is 2.2GB AND the machine is FAST as it ever was. See, 4GB does all that easy ;-) – misha256 Sep 1 '15 at 0:01
  • 3
    @mattycfp 120 Windows of FF? You're more likely to max out your CPU than RAM doing that, especially on a laptop. Also don't forget FF is a 32-bit app, and multiple FF windows actually SHARE a single 32-bit process, so FF is actually quite limited, it can only use 2GB of your 8GB total. That's why you need to run lots of different apps at the same time to test how Windows uses your RAM, not just 120 Windows of FF. – misha256 Sep 1 '15 at 0:37
  • 4
    @misha256 You will see performance gains if your system is constantly swapping memory. As memory pressure increases, paging increases, and the system slows down. It's not that adding memory will make you go faster, but it will keep you from slowing down, especially if the software involved assumes a certain amount of paging in its system requirements. That article didn't seem to mention much about paging. Paging is what slows you down. – phyrfox Sep 1 '15 at 3:34
  • 4
    @misha256 I have IRC, Spotify, Notepad++, Chrome and Task Manager open and I'm using 3.02GB out of my total 4GB :( Opening up 3 VS2013 instances (which I tend to do at work) and that maxes me out. It's a bit easier to reach 4GB limit than you'd think, but practically requires a power user. – Thebluefish Sep 1 '15 at 4:04
  • 1
    @misha256 Correction: FF is large-address-aware and can address up to 3GB in a 32-bit process. The 64-bit version of FF (currently in beta for Windows) can obviously address far more. I also feel you are generalising a bit too much when saying it's hard to "use" (resident private working set) more than 4GB of RAM; it really depends a lot on what you're doing and how much you keep open. My baseline usage already exceeds that. – Bob Sep 1 '15 at 5:31
5

Windows does some clever stuff such as paging memory. It could be that it sees most of the tasks you are doing as unnecessary and decides to dump a load of stuff into the page file, making it look like it's doing it just to avoid using up all your RAM. You could test this theory by disabling paging, although this is not a thing you should have permanently configured. There are many tutorials on the internet to do this. One of the things it does (even on my 24GB and 64GB machines) is to make the paging rules much more strict when it reaches approx 50%, 80%, and 90% consumption (these figures are approximate). I've noticed at each of these stages a load of stuff gets dumped into the page file.

A fun thing to do might be something like this:

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#define PAGE_SZ (1<<12)

int main() {
    int i;
    int gb = 2; // memory to consume in GB

    for (i = 0; i < ((unsigned long)gb<<30)/PAGE_SZ ; ++i) {
        void *m = malloc(PAGE_SZ);
        if (!m)
            break;
        memset(m, 0, 1);
    }
    printf("allocated %lu MB\n", ((unsigned long)i*PAGE_SZ)>>20);
    getchar();
    return 0;
}

That's some C code. Get GCC or some compiler, make yourself an exe, and watch your memory consumption go up. If you want to consume more than 2GB of memory, you'll need to compile and run as a 64-bit process. If you're into that sort of thing it could be an interesting experiment, if nothing else :)

Edit: Just wanted to note that the program won't die with this. I edited it from some previous code since I'm not sure that other code would have worked (the memory would be paged, resulting in no memory being consumed, lol). The new code contains a line int gb = 2; // memory to consume in GB - changing the 2 will adjust the amount of memory the program should consume, thus you can set it to use up as much as you want. Setting it to something above what your system has will probably cause it to crash (not tested, so use with caution)

| improve this answer | |
  • I wish I could compile it, but my Internet keeps corrupting every download I try :U – mattycfp Aug 31 '15 at 23:42
  • 5
    @mattycfp So you can't use >4GB of RAM in your OS, and all your downloads keep corrupting? Time to (a) WIPE the hard drive and do a fresh OS install, or (b) throw the laptop in the bin and get a proper one already. – misha256 Sep 1 '15 at 0:46
  • 1
    The program offered allocates and "touches" 2 GB of virtual memory, one page at a time, which will result in each page being faulted into RAM immediately after it's allocated. But that doesn't guarantee that Windows will keep it all in RAM at the same time. Since the program is not repeatedly accessing all of the v.m., the pages allocated first may be subject to being paged out. You can get the same effect as that program with the Windows Internals tool "testlimit", option -d . – Jamie Hanrahan Sep 1 '15 at 4:40
  • @mattycfp if that's the case, you might want to see that the RAM is not at fault... Does every file you download get corrupted somehow? There are also sometimes issues with incompatible sticks, so you should check the motherboard manual and confirm that your RAM is organised according to those instructions (slots will be numbered either 1 & 2 or 1-4, and usually 1&3 must be paired up with the same "type" or "make and model" of RAM, as will 2 and 4). & Yes this program should use up 2GB, that can be edited by changing the line int gb = 2; // memory to consume in GB - just change the 2. – XtrmJosh Sep 1 '15 at 6:18
  • Why did you declare gb to be of type int when the only use casts it to unsigned long? You're also treating i the same way and doing a mixed comparison between the int and the cast-to unsigned. So just make i unsigned long, also. – JDługosz Sep 1 '15 at 21:58
1

Are you using a 32-bit program to test how fast the computer is running? If so, note that 32-bit addresses can only point to 4 GB of the RAM, even if you have more RAM present. You'll need to repeat the test using a 64-bit program and checking its speed with 4 GB of RAM present, and again with 8 GB of RAM present, if you want useful results. Also, it will need to be a 64-bit program which can use more than 4 GB of memory to run faster - not all of them can. To tell if a program is 32-bits, start the program and leave it running, then start Windows Task Manager, click on Processes, and scroll down until you find the program of interest. If the name of the program in the Image Name column is followed by a space, then *32, then it is a 32-bit program.

| improve this answer | |
  • if you run several 32-bit programs, their total RAM use can easily reach 8 GB. – Jamie Hanrahan Jan 30 '16 at 5:17
0

Get process explorer (procexp) from Sysinternals. It has a resource graph and can show per-process memory use, much better than the stock process view.

You can look at physical ram use vs virtual spqce usage, to see if you're simply not using it all up or you seem to need more but are limiting the physical usage.

Most mundane programs use a different working set size that will keep demand low. If a program allocates a ton of memory it's not really using all of it at the same time...

Windows will agressivly move pages from your program to a list where they are available, but if a page fault occurs it will be pulled back frommthe list without having to load it from the swapfile. The standby might be including these. Different tools label different sets in different ways.

You could try turning off the swap file, at least for this test. That will cause data memory to really be used. Though procexp might be enough to see that clearly.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.