RAM usage % on Task Manager lower than actual RAM
I have noticed an application I use quite often (Android Studio) is hogging my RAM and making my system slow if I dont close it. I have read up and see there is some kind of bug with it, this is fine I guess.
But when I look at Task Manager its saying 77% of my RAM is used. But Android Studio is using around 1GB and everything else combined looks like less than 2GB to me. So how is that 77%?
Here is screenshot showing the Task Manager, and the System specs. I'm not really great at maths, but I am sure that doesn't add up.
Solution 1:
The numbers shown in the Process tab are not the full memory usage of the process. This shows only the private working set which is only a part of the total. You need to see the details tab to see the full working set. But due to memory sharing there will be some double counting and these numbers will be somewhat high.
There are also some substantial users of memory that are not processes, not all of which are shown in Task Manager. This includes the resident portions of the Paged pool, the Non-paged pool, the file cache, and more. The file cache, which can be 500 MB or more, is not shown at all.
Memory usage in any modern operating system is far too complex to be fully accounted for by adding up a column of numbers.
Solution 2:
But when I look at Task Manager its saying 77% of my RAM is used. But Android Studio is using around 1GB and everything else combined looks like less than 2GB to me. So how is that 77%?
Modern operating systems go out of there way to use as much RAM as possible all the time. You can't save RAM for later -- you can't use less RAM now so you can use more RAM later. So there is no disadvantage to using as much RAM as possible.
If you're thinking, "But I want my RAM to be free now so I can use it later", that's nonsense. You can use the RAM now and also use it later. Not using RAM now actually makes it harder to use that RAM later because more effort is needed to use it later.
I was more intriqued as to why so much RAM was in use, and if a game for example takes 8GB where does that leave me . (Note for the record I play PUBG regularly on Ultra, even when it first came out and everyone else seemed to be moaning about bad performance) – Super MegaBroBro 12 mins ago
If a game take 8 GB, then some of the RAM that is currently being used for less important purposes (like reducing disk I/O) will instead by used by the game. Switching RAM from one use to another is easier than switching it between free and used.
Imagine that you run a program, say Task Manager, and then you close it. The computer has two choices -- it can either free the RAM that held the program or keep it used.
If it frees it, that takes effort, which is likely wasted since the RAM will just have to be made used again in order to provide any benefit. If it keeps the RAM is use, it is saved the effort of having to free it, saved the effort of having to make it used again to use it later, and if you run Task Manager again, it won't have to read the program from disk. This is a win all around.