10

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.

enter image description here

enter image description here

Big T Larrity
  • 285
  • 1
  • 3
  • 9
  • 1
    Task Manager is only listing the application that the user has started it lists none of the other processes that are running belonging to the system. Task manager makes a horrible debugging tool. Windows is using a chunk of your memory to prepare for it to be used in addition Windows itself is using some of your memory. Your performance problems are not connected to the amount memory being used though – Ramhound Dec 18 '17 at 01:06
  • Right ok, but that would mean that my system is using around 4GB-5GB just by running at all times? before I load anything, its also basically a fresh install of Windows – Big T Larrity Dec 18 '17 at 01:07
  • theres a huge list of tasks that i didnt open here – Big T Larrity Dec 18 '17 at 01:09
  • 2
    Possible duplicate of [Why do Resource Monitor and Task Manager's total RAM usage not even remotely add up to the total Physical Memory usage?](https://superuser.com/questions/906161/why-do-resource-monitor-and-task-managers-total-ram-usage-not-even-remotely-add) – Ramhound Dec 18 '17 at 01:09
  • Task Manager doesn’t break down memory usage, there is more then just applications that use system memory – Ramhound Dec 18 '17 at 01:11
  • its using 5GB? holy sh- what the heck is it up to when Im not looking? – Big T Larrity Dec 18 '17 at 01:12
  • I guess i go buy more RAM then lol – Big T Larrity Dec 18 '17 at 01:13
  • 1
    You have more memory then your system needs currently. Adding more system memory WILL not solve your performance issues. – Ramhound Dec 18 '17 at 01:34
  • The performance is actually fine. It just gets laggy if I leave Android Studio open too long in background. Its a minor bother, not system destroying. 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) – Big T Larrity Dec 18 '17 at 01:37
  • 3
    The [Sysinternals RAMMap](https://docs.microsoft.com/en-us/sysinternals/downloads/rammap) tool will give you a better idea of what's actually in your RAM, though not necessarily per-process. Please include a screenshot of RAMMap. – Bob Dec 18 '17 at 05:57

2 Answers2

4

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.

LMiller7
  • 2,518
  • 1
  • 10
  • 11
  • +1 for the first paragraph. Most likely a good chunk of the resident memory seen here is actually shared and not private, and therefore does not appear directly in that column. – Bob Dec 18 '17 at 05:55
  • 1
    Thank you, I get it now. In a nutshell I will but a little more RAM soon. By the way, thanks to this LMiller and @DavidSchwartz and everyone else for the insightful answers and discussions – Big T Larrity Dec 18 '17 at 11:19
  • is there any good program that shows all the programs/processes that take space on physical ram? – papajo Mar 23 '22 at 08:37
1

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.

David Schwartz
  • 61,528
  • 7
  • 100
  • 149
  • hi there, hmm ok thanks. I was more thinking of lifetime usage for no reason and/or electricity. But more than those, the fact that when memory usage got to 80% the system became slow and I had to close the app i was actually using to accomodate that. But the OS was using 4-5GB on tasks I have no prior knowledge of, or control over – Big T Larrity Dec 18 '17 at 01:51
  • If your question was really about performance, then why ask a question about RAM usage? – David Schwartz Dec 18 '17 at 01:52
  • its not about performance. My question is clear: why it say 77% of RAM used, when clearly 6GB wasnt fully accounted for in the stats – Big T Larrity Dec 18 '17 at 01:53
  • to fix the performance issue, I had to close Android Studio, which was the end of issues. – Big T Larrity Dec 18 '17 at 01:54
  • Your performance issues with Android Studio likely have nothing to do with your operating system's use of RAM. Why would you think that? – David Schwartz Dec 18 '17 at 01:54
  • i didnt say it was, the high usage from Android Studio is what led me to discover that it is using 5GB+ as standard. And that the stats actually appear not to add up to 77% of my RAM . Hence the question...... – Big T Larrity Dec 18 '17 at 01:55
  • Android Studio is a resource intensive program. It is not possible for PUBG to use 8GB in your current setup. Android Studio also isn’t using 5 GB it’s using around 1.25 GB the rest is being used by Windows for other needs. Windows will immediately release the memory if requested by a program. Your performance issues are connected to your CPU, VRAM, or GPU your performance issues have nothing to do with your system memory – Ramhound Dec 18 '17 at 02:03
  • anyway thanks @DavidSchwartz for your answer, Ramhound the 8GB was just a random figure I wrote. Obviously its not going to be able to use every bit of RAM. Anyway thanks for the help guys. I think it wont be long till 16GB is going to make a noticeable difference to my system, i think ill just get some and see – Big T Larrity Dec 18 '17 at 02:05
  • I dont have performance issues btw pal. I have i7 4790k and 1060GTX it works lovely. – Big T Larrity Dec 18 '17 at 02:06
  • Your question literally is about system performance issues. – Ramhound Dec 18 '17 at 03:36
  • 3
    "Modern operating systems go out of there way to use as much RAM as possible all the time." — That's more relevant when discussing the disk cache, but the disk cache is not included in the percentage value the OP mentioned. (Note that the percentage on the header of that column measures non-"available" memory, not non-"free" memory.) – Bob Dec 18 '17 at 05:59
  • @Bob Ahh, so the OP misread the tool and reported that "77% of his RAM was used" when it was likely actually greater than that. – David Schwartz Dec 18 '17 at 10:57
  • The question wasnt about system performance. The question is "WHY IS THE TASK MANAGER REPORTING 77% WHEN THE AMOUNTS DONT ADD UP TO 77% OF TOTAL RAM" Hence the title not saying, 'Why is Android Studio eating ram, or why is my system slow?' If it was performance problems I had the first thing I would of done is establish why the app is using more than average, but i have plenty of system resources to deal with it so the performance is fine, as I have mentioned at least once already – Big T Larrity Dec 18 '17 at 11:11
  • also the answer is not worth the work involved getting it. At this stage its almost like asking why an Egg is round, only to have people argue telling you its not round, its more oval – Big T Larrity Dec 18 '17 at 11:16