2

I recently upgraded my RAM modules from 16GB total to 64GB total. Before, when I for example trained a deep learning model in python with 2 chrome tabs open, it used 4-6GB RAM and the RAM usage in both views would be roughly similar. Now with the new sticks, when I have no specific programs open and the PC is idling, the RAM usage is a whopping 10% (6+GB): memory usage - performance tab When I look at which apps are hogging the RAM, the numbers just do not add up. sorted list view of applications using memory How can I find where this discrepancy is coming from? Or rather: find out which applications and processes are using RAM that are not showing up on this list view?

8
  • 3
    This gets asked a lot but I can't find a canonical one right now. Basically, if the system isn't starved of memory, it sees no reason to hand it back. The assumption is that whatever needed it before might need it again, so if it's already there, it doesn't have to go fetch it from disk again, thousands of times slower even with an SSD. The adage is "empty RAM is wasted RAM."
    – Tetsujin
    Dec 21, 2021 at 10:03
  • 1
    Pic from my own system right now - doesn't matter that it's not the same OS, the principle is the same i.stack.imgur.com/LEGZd.png Nothing using more than 1 GB but 30GB still in use. Memory pressure is at "absolutely no worries" levels. [The slight dip in the green bar is because I just realised Photoshop was using 25GB it really didn't need to be, but it's been running two weeks, so I thought I'd relaunch it to fresh it up. Prior to that my overall usage was nearer 50GB… still in the 'no worries' area.
    – Tetsujin
    Dec 21, 2021 at 10:12
  • As soon as something else needed the RAM, it would have grabed back all that 'spare' from Photoshop, which didn't really need it, it was keeping it for 'just in case'
    – Tetsujin
    Dec 21, 2021 at 10:12
  • 1
    It's not really a case of frugality, it's preserving potentially useful data, cached as close to the point of use as possible, ie in the RAM, not on disk. It provides the closest to instantaneous response if the cache is required again & is immediately reclaimable if something else has need of it. It is the most efficient method. If you run the machine for a month without restarting, you'll probably see that getting fuller & fuller over time, as more & more is cached. It is not a problem, it is a solution.
    – Tetsujin
    Dec 21, 2021 at 14:54
  • 1
    Windows will try to use all available memory but for 256K (so if you start a program there is space to load without paging anything out). The memory page is made up. It is an interpretation of the actual memory status. If you hover over the bar graph the tooltips will tell you actual memory status. Windows tunes itself to memory at boot and then constantly tweaking it. This is an old article from MS (and thrown away by them) about how Intel CPUs and Windows handle virtual memory - labri.fr/perso/betrema/winnt/ntvmm.html. Dec 21, 2021 at 16:11

1 Answer 1

5

The numbers in the process tab will never add up to full memory usage. They were never meant to. Memory usage in a modern OS is very complex and you can't account for total memory usage by adding up a column of numbers. This is very difficult to do, even if Task Manager provided all the details, which it doesn't. Other utilities such as Process Explorer, not part of Windows, will show more but requires considerable knowledge to make sense of it.

To start with the process list doesn't show the full memory usage of a process. This shows only the process private usage and not memory used by executable files such as EXE's and DLL's which is often shared by multiple processes. The working set column in the details tab shows this but the sharing means you can't just add up the numbers.

Then there are major users of memory that are not processes. This includes the Paged and Non-paged pool numbers. The Non-paged pool usage is entirely in RAM while the Paged pool is not. Task Manager will not show you how much is resident but it is typically mostly so, particularly if there is plenty of available memory.

Then there is the file cache. This is not the "Cached" value in Task Manager which is entirely different and not shown at all. In a file server this is typically the largest user of memory. In a workstation it will be smaller but usually substantial.

There are also various other memory consumers which are not shown at all in Task Manager.

Memory usage in a modern OS is highly dynamic and under the control of the system memory manager. The goal is to maximize overall system performance not minimize usage. When available memory is high, as is clearly the case here, the memory manager will allow processes and other users to use pretty much what they want with few restrictions. This is as it should be. Better to use the memory for something, even if it is only of trivial value. Free memory is the ultimate in wasted memory. But when memory requirements are higher the usage will be automatically trimmed back, drastically if necessary. This will only be done when necessary as it can seriously impair performance.

1
  • Thanks for the extensive answer and explanation :)
    – DaReal
    Dec 25, 2021 at 11:12

You must log in to answer this question.

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