-4

Why is there a total of 5GB of memory used when all the processes together only use over 2GB? Why does the system take so much RAM?

2

2 Answers 2

1

Systems that are not under memory pressure have no reason to try to make RAM free. In fact, they use as much RAM as they possibly can because RAM that is in use can improve performance. RAM that's not being used is forever wasted, you can't save RAM for later, so modern operating systems try to keep as much RAM in use as they possibly can.

It's much more efficient to directly transition RAM from one use to another than to make it free only to have to make it unfree again.

This behavior is by intentional design. If you want memory to sit around doing nothing, remove it from your computer and sit it on your desk.

If you're thinking "I want that RAM free now so I can use it later", get that out of your head. You can use it now and use it later. There's no tradeoff to make here.

0

One, if the column headings are what I think they are, the first two processes by themselves are using 2 GB. (Note, the "system" process is not the operating system... not all of it, anyway. For example memory used by the paged and nonpaged pools, the file cache, and the SUperFetch cache, doesn't appear as part of the "system" process.)

Two, that column only shows the size of each process's private working set. But each process has a lot more RAM than that. The rest is in its shared working set. This is eligible to be shared between processes, but it isn't necessarily. if you added up all of the shared working sets.... unfortunately that won't tell you what the true total usage is. It is nowhere near as large as the total of those, and it is very, very unlikely to be as small as simply the largest of the shared working sets.

Three, the OS does keep a lot of stuff around that isn't part of any process. There is the nonpaged pool. There is the resident (paged in) portion of the paged pool. The resident portion of the system file cache (not the SuperFetch cache) is also part of memory that is considered "in use" (not "available"). (The space used by SuperFetch is considered "available").

Four, almost all of these uses (except the nonpaged pool) are pageable, so they don't represent how much each component "needs", but rather "how much it's using under current conditions".

Windows allows processes and the other pageable usages to opportunistically grow if there is no pressure on RAM. Here you have enough available RAM to do everything you're currently doing again, without closing anything currently running. That is not a system that is experiencing memory pressure, so of course Windows is not being frugal with the RAM.

Run the exact same workload on a machine with only 6 GB RAM and you would likely see everything somewhat smaller, but not much. Run it all on a 4 GB RAM machine and everything would definitely be smaller (and likely run a little slower, but not much, because it's likely a lot of what's in RAM in your current config is "stale"... not much harm in sloughing off to disk.)

Back to your current setup: If you suddenly needed to run something that needed, let's say, another 8 GB RAM, Windows would shrink existing working processes - starting with the least active - to make room for it. RAM is not like gasoline; as David Schwartz put it very well, there is no need to conserve RAM now so you can use it later. Windows can use it now for one thing and then let you use it for something else later. That's a demand-paged operating system for you.

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