How do I find what's eating up all of my system's memory?

Coldblackice

[H]ard|Gawd
Joined
Aug 14, 2010
Messages
1,152
How does one diagnose/discover memory-related problems, if Task Manager appears to not be reporting correctly?

I must have a memory leak or something -- I'm at 75% usage of my 12GB of memory, but Task Managers listings of processes' memory usage isn't adding up (yes, "Show processes from all users" is checked).

It seems like this "phantom" memory usage grows in relation to how long the system's been up. It shows that there are 118 total processes. Besides the top 5, all of them are under 50MB.

The top process is firefox, using 2.6GB. Adobe Premiere at 900MB. Plugin-container at 300MB. Pale Moon at 275MB. Explorer.exe at 94MB.

How in the world can I find what's using up the rest of my memory? It seems as if Task Manager isn't seeing everything that's being used. Perhaps there's some kind of memory leak? Or program's aren't releasing used memory properly?

Resource Monitor reports:

http:///KEeXng
 
Depending on your operating system the thing taking up your memory is the file cache. On windows this is done by Superfetch. Try disabling superfetch from the services panel [Win+R services.msc] restart your machine and see if the memory still rises after long uses. Make sure to open and close a bunch of programs and some large videos/games to see if it is just the file cache. As long as your programs aren't choppy then don;t worry about it. The OS will always clear out the cache when it has to make room for running programs.
 
I recommend using Process Explorer to dig deeper. You can even view performance information for RAM usage.
 
In Task Manager, Performance Tab, look at the bottom under the "Physical Memory (MB)" section. Tell us what values it is reporting for:

Total:
Cached:
Available:
Free:
 
Depending on your operating system the thing taking up your memory is the file cache. On windows this is done by Superfetch. Try disabling superfetch from the services panel [Win+R services.msc] restart your machine and see if the memory still rises after long uses. Make sure to open and close a bunch of programs and some large videos/games to see if it is just the file cache. As long as your programs aren't choppy then don;t worry about it. The OS will always clear out the cache when it has to make room for running programs.

Hmm, reading up on SuperFetch makes it seem like that's the problem, but unfortunately, I found that SuperFetch has already been disabled (my main OS drive is an SSD).


I recommend using Process Explorer to dig deeper. You can even view performance information for RAM usage.

I'll pop into Process Explorer and look around.


In Task Manager, Performance Tab, look at the bottom under the "Physical Memory (MB)" section. Tell us what values it is reporting for:

Total:
Cached:
Available:
Free:

Total: 12279
Cached: 1577
Available: 5282
Free: 3745

Additionally, I understand the principal that memory is meant to be used, and not just sit dormant, but when I see my memory near fully used to capacity (apparently) , I stop myself from opening any other program, and even toil around to close some down to give a bit of breathing room. I don't like seeing the 1GB page file on my SSD have to climb to 6GB. (on that note, perhaps I should just lock that page file at 1GB static?)

For instance, I wanted to play some Max Payne tonight. The bulk of memory-eating programs opened were my browser, VMware (small 1GB memory machine), and Adobe Premiere. Together, they didn't appear to be taking up more than 4-5GB of memory. But Task Manager showed otherwise -- around 11GB of memory was used.

Wondering if I wasn't interpreting it right, or if there was some sort of error in reporting, I went ahead and ran Max Payne anyway. After a bit of loading, I was popped out of the game to the desktop where Windows gave me the warning that it was detecting system's performance dropping, and asked if I wanted to drop the scheming down. I said no and went back to the game.

Oddly enough, the game seemed to run just fine, with no unusual stuttering/sluggishness/choppiness.

Any ideas? Or is it just a manner of how Windows is implementing/pre-loading the memory, and I should just ignore it and go "guns-ablaze"?
 
Last edited:
Additionally, I understand the principal that memory is meant to be used, and not just sit dormant, but when I see my memory near fully used to capacity (apparently) , I stop myself from opening any other program, and even toil around to close some down to give a bit of breathing room.

That's not what the numbers you provided are showing. They are showing that you have more than 5GB of memory available for any program that needs it.
 
The numbers I posted were hours after the initial post, after I had closed programs that were taking the most memory (but still less than what would add up to the total used/reported). So the air had cleared up a bit, although those numbers still report more than the sum of the tasks-used memory.

On Stackoverflow, I found a suggestion to use a program called RAMMap. Through using this, I've discovered a significant chunk of memory usage that I didn't know before -- Mapped Files. It shows I have 3.5GB used of mapped files!

I'm guessing that Windows will usher those files out of memory according to program demands. While I understand and appreciate this system from a maximum performance side (unused ram is wasted ram), it's a bit cumbersome because I don't know when I'm actually crushing the limit of my available memory, rather than just a temporary/"false" memory use while it's sitting dormant?

Like when I ran Max Payne 3, for example, and it appeared to run fine (and I definitely should have had lots of memory to spare, according to the already running programs), Windows still popped me out to the desktop because it detected my system was sluggish, and suggested I drop the color scheme.
 
Last edited:
That issue with Max Payne doesn't have anything to do with free RAM, it's a driver/game thing so don't worry about it If you want, you can set the properties to "disable desktop composition" and it should stop it from happening.. If you have 12GB you aren't going to run out of RAM for anything, unless you are running VMs or a RAMDisk or something to allocate large chunks of it.
 
On Stackoverflow, I found a suggestion to use a program called RAMMap. Through using this, I've discovered a significant chunk of memory usage that I didn't know before -- Mapped Files. It shows I have 3.5GB used of mapped files!
That's SuperFetch. Don't worry about files cached to RAM. Windows releases those files from memory instantly if programs (which take precedence) need more memory, which means that...

I'm guessing that Windows will usher those files out of memory according to program demands. While I understand and appreciate this system from a maximum performance side (unused ram is wasted ram), it's a bit cumbersome because I don't know when I'm actually crushing the limit of my available memory
That's exactly how it works. The last sentence, however, isn't true. It doesn't hinder your free memory in any way.

Like when I ran Max Payne 3, for example, and it appeared to run fine (and I definitely should have had lots of memory to spare, according to the already running programs), Windows still popped me out to the desktop because it detected my system was sluggish, and suggested I drop the color scheme.
That would probably be video RAM. The only thing I can recommend doing is setting the Max Payne 3 executable to disable desktop composition on the Compatibilities tab when viewing its properties. Aside from that, that issue might be borderline bug.
 
Well, to elaborate on what I meant by "crushing the limit" --

How do I know when my computer's memory is nearly completely filled with "critical" things that can't just be whisked away from memory, like program's, vs. just temporary cached files that get dumped out when memory is needed?

For example, if I'm only running Firefox, but Task Manager shows I'm using 11GB out of 12GB (exaggerated example), I'll obviously know that I actually have plenty of memory available for running more programs, and that it's just mapped files that are temporarily taking up the space now.

Compare the above with this -- I have a heavy-loaded browser(s) open, running a VM, Adobe Premiere/Photoshop crunching away, and a beefy game like Max Payne running. When I go to check memory usage, again it shows 11GB out of 12GB used -- BUT, in this case, it's actually "hard" memory, memory that can't just be quickly brushed off the desk to make room for others (well, without crashing some other program closed).

Not sure if I explained that predicament well enough. Does that make sense? How can one tell if their current memory use, if it appears it's full or close to reaching the limit, is just temporary stuff that Windows is caching, or is actually from running programs that are causing the system to brush up against the hard limit? Is there a way to see or know this is the case without manually going into a program like RAMMap and checking to see where the Mapped Files memory use is at?

As to your suggestion of SuperFetch -- I thought I have that disabled? At least, the Intel SSD toolbox told me that it had disabled my system's SuperFetch because of the SSD (used as main OS drive). Is there another way to check if it's actually enabled or not? If it is enabled, would it be wise to disable it?

As to the video RAM suggestion -- ahh ok, that makes sense. Although, I have a 6950 with 2GB of video memory, so I'd be surprised if I was hitting that limit (and only running on a single monitor). I guess that's easy enough to check, though; I'll open up GPU-Z and keep an eye on video memory use.

And thanks for the tip on setting the exe to disable desktop composition!
 
Well, to elaborate on what I meant by "crushing the limit" --

How do I know when my computer's memory is nearly completely filled with "critical" things that can't just be whisked away from memory, like program's, vs. just temporary cached files that get dumped out when memory is needed?

It's all in the task manager, and that is why there are different values for "Available" and "Free". "Free" is memory that hasn't been used for anything, even caching. "Available" is the amount of memory that you have ready for any program to use at any time. "Available" is typically the sum of "Free" and "Cached" values.

If the memory you have listed as "Available" runs out, then you might have a problem. It doesn't matter if "Free" is zero or not.
 
It's all in the task manager, and that is why there are different values for "Available" and "Free". "Free" is memory that hasn't been used for anything, even caching. "Available" is the amount of memory that you have ready for any program to use at any time. "Available" is typically the sum of "Free" and "Cached" values.

If the memory you have listed as "Available" runs out, then you might have a problem. It doesn't matter if "Free" is zero or not.

Ahh, didn't know that. Thanks for pointing that out!


My understanding is that if your Committed memory (Commit) is greater than your Total physical memory then you are swapping to disk. In that case, you need to add more RAM.

Anything other than that, just let Microsoft's Memory Manager do its job.

Edit: Source information from Mark Russinovich
http://blogs.technet.com/b/markrussinovich/archive/2008/11/17/3155406.aspx

Thanks for the info/link!
 
My understanding is that if your Committed memory (Commit) is greater than your Total physical memory then you are swapping to disk. In that case, you need to add more RAM.

That is not given. Commited memory just means that it is available to the application. It doesn't necessarily mean that physical memory has been assigned. If I commit 10 GB, but only use 512 MB then only 512 MB physical ram is used.
 
What hypochondriacs is to people who think they are sick all the time, now we have "technochondriacs" who think their PC is sick all the time.
 
That is not given. Commited memory just means that it is available to the application. It doesn't necessarily mean that physical memory has been assigned. If I commit 10 GB, but only use 512 MB then only 512 MB physical ram is used.

True, but as a developer why would you allocate 10GB when you only use 512MB?

Your example is true only for poorly written applications or clueless developers.

For the VAST majority of applications, you can expect their commit use to be an accurate representation of their actual use.
 
Back
Top