0

My problem seems simple. My computer is using more physical memory than is actually accounted for in the sum of my programs.

!(Running windows 8.1, latest patches)

What windows reports my total usage as

What the total system usage is

I use 7.5 GB. Total usage is 12GB. The Delta is 4.5 GB. This is something I'd consider very high.

Most of the posts I've found on this site relate to driver memory leaks affecting the 'paged pool' and the 'non paged pool' creating high usage. However my pages + nonpaged pool is around 650MB, which I understand isn't far above 'normal', and shouldn't cause this 4.5GB delta. To further investigate this, I even ran poolmon.exe and found no such leaky drivers when I sorted by usage.

Poolmon screenshot

So my question is simply: what gives? Where art thou memory?

Update:

A kind user referred me to the program rammap, which gives more detailed descriptions of memory allocation. Upon running it, I discovered that 2GB of memory in the 'in use' section was allocated for 'Mapped Files', which I presume is disk caching. Upon going to the 'physical pages' tab and sorting by said files, I learned that a lot of the active mapped files were files in use by a torrent application hosting large datafiles. Terminating the application freed 1.2GB of disk caching into 'standby', thus giving the screenshot you can see below.

Rammap

The the 'delta', has dropped to 3.2 GB, which is getting closer to what I'd consider normal but is still on the high side, though if you subtract the remainder of the 'mapped file' 800MB, you end up with 2.4GB, which could be simply explained away by the count listed in Users in the task manager being incorrect.

With this information, now I'm not so sure. Is this just me not understanding memory accounting? Is the 'shareable' section in the table actually used by user programs and just not accounted for in the user's space in the task manager? If so then this issue would be a mixture of me not knowing disk caching can count under 'In Use'/'Active' memory and that the User's tab in the task manager is inaccurate.

  • What do you mean by "system memory usage" exactly? Do you just mean memory that's being used? Also, you tagged this "memory-leaks". Do you have any evidence of a leak? Do you have an actual problem or do you just need to understand how Windows 8 uses memory? – David Schwartz Apr 21 '18 at 5:43
  • @DavidSchwartz I very much dislike the tone of your comment. System memory usage is referring to memory usage that isn't accounted for by user programs. The actual problem is the stated one, that system memory usage is unusually high, higher than I have observed on other computers of mine also running windows and also operating on similar workloads. Do I need help understanding how W8 uses memory? Maybe? Do enlighten me by answering the question informing me where exactly I'm going wrong in my reasoning, and I'll promptly close the question and mark said answer as correct. – Claire Fey Apr 21 '18 at 6:05
  • So - this question was brought up as a possible duplicate. However it feels like this question's much better than the other one, and I kinda feel we might want to let it run its course we close it either way, especially if the root cause is differemt – Journeyman Geek Apr 21 '18 at 6:14
  • @JourneymanGeek thank you for editing my post and making the images display by default. I didn't know I could do that by virtue of my noob-ness ;) – Claire Fey Apr 21 '18 at 6:26
  • post pictures of RAMMap, the kernel pool usage is ok. – magicandre1981 Apr 21 '18 at 7:07
0

Windows 8, like almost all modern operating systems, goes out of its way to use as much memory as it possibly can. Why? Because any memory not used is forever wasted.

If a system has 8GB of memory and only uses 7GB, it gains nothing. It can't use 9GB later. It simply has forever lost any benefit it might have gained from that extra 1GB for as long as that memory was free.

For example, say your system has lots of free RAM and you run some program. When the program finishes, the system has two choices. It could keep the program (the actual executable file on disk) in memory or it could free the memory that held the program file.

If it frees the memory, it has to go to the trouble of freeing it. If it ever wants to use that memory again, it has to go to the trouble of unfreeing it. And if that program is executed again, it has to be loaded from disk. Triple yuck.

If it doesn't free the memory, it doesn't have to go to the trouble of freeing it. if it wants to use that memory for some other purpose, it doesn't have to bother unfreeing it, saving a step. And if the program is executed again, it doesn't have to be loaded from disk. Triple win. And, of course, since no process is running that program currently, the memory won't be associated with any process.

So what's happening is that your system has sufficient free memory that it can operate in a very efficient way where it doesn't waste effort making memory free unnecessarily and then doesn't have to waste effort unfreeing memory in order to use it. Instead, it can efficiently transition memory from one use to another, and if the data in that memory happens to be needed, disk I/O can be avoided.

It's a win all around. The memory is storing data that the system hopes that some future process may find useful, and it's also avoiding extraneous trips through the free memory list to make memory free just to have to mark it used again. Modern operating systems only need to keep a very small amount of memory free, just enough to handle emergency situations (such as page faults and requests for memory from interrupt code) where it can't easily transition memory from one use to another.

  • Thank you for your answer David. I do have an appreciation for the idea that absolutely free memory is wasted memory, since it can be used instead to cache data for future use, instead of loading it from disk. What I do not understand is why is the memory that it's using to cache not listed under 'Cached'/'Standby' ('Memory that contains cached data and code that is not currently in use') in task manager? I was under the impression that cached data was included there, instead of under the 'In Use' metric ('Memory used by processes, drivers, or the operating system') – Claire Fey Apr 21 '18 at 6:19
  • @clairefey - fyi: Mark Russinovich explains the mysteries of memory management: youtube.com/watch?v=AjTl53I_qzY youtube.com/watch?v=6KZdNsq1YV4 – akira Apr 21 '18 at 7:34
  • @akira Thank you, I'll be sure to watch those tomorrow morning. – Claire Fey Apr 21 '18 at 7:42
  • You will be delighted. Btw: Mark wrote the tools you were referred to. – akira Apr 21 '18 at 7:43
  • You're missing a very key point -- absent evidence of a memory leak (which you don't have), the less free memory the better. OSes are specifically designed to keep as little memory free as possible, trying to achieve the minimum absolutely necessary. – David Schwartz Apr 21 '18 at 16:25

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.