why does Windows suck up so much ram and not give it back when I need it?

Status
Not open for further replies.

cannondale06

[H]F Junkie
Joined
Nov 27, 2007
Messages
16,180
this always bothered me on Vista and the same thing happens on 7 too. with nothing more than Steam and FF with 20 tabs running all 4 gb of my ram eventually gets eaten up. at this point just clicking on tabs or opening up a file becomes a little sluggish. if I try to run a FRAPS video it will literally just pause for a few seconds as the hard drive has to do everything. these are not problems for the first couple of hours after a reboot but will eventually happen every time. and again it has happened on every Vista and 7 install I have ever used even on completely different comps.
 
its only using 1.5gb ram but the other 2.5 gets cached and takes too long to be freed up when I need it.
 
That doesn't make sense. It's not a write-back cache, the cache gets freed immediately, I've never seen it slow down due to releasing stuff, or anything else, except high loads.
 
well I am telling you how its been for me. when I first got Vista several years ago I noticed it but just blamed it on Vista. I used 7 beta and RC and it still happened. on this pc with 7 it still happens too.
 
If running 20 tabs in Firefox is breaking that machine that way, either your installation of Firefox is borked (RAM leaks, etc) or something else is going on. I can load up Firefox with 200 tabs anytime I want, and that's different content in every tab of all varieties and I still won't crack a gig of usage (and yes, I've done it in testing).

There's just no way running the OS and Steam and Firefox with 20 tabs is going to do that - something else is wrong. Even with SuperFetch working I'll never see that kind of RAM usage either on a 4GB laptop I have or on my current machine (HP 8510p with 8GB in it). Windows 7 just doesn't use RAM like that - and when I say use I do mean use it, not just SuperFetch but apps, etc.

As noted above by the other poster, when RAM is actually required/requested by any given app, SuperFetch will let it go without hesitation, at least in my experience. If it's not, then something else is wrong, somewhere.

Hard to say what given none of us has a direct hands on with the machine in question but, something's up. RamMap will give you some idea of what the memory map looks like in real-time, and you can use the options in RamMap (under the Empty menu option) to "clean house" and see what effect it has, just make sure to actually watch what's going on when you use it meaning the graph data in the app.

Very helpful tool...
 
its even worse when I use Chrome. I can initially open tons of tabs and its not any worse than using 20. the point is that once the pc has been running for a while everything is in cache so opening up FRAPs videos or even looking at pics on my pc becomes sluggish. again this has happened for years on different comps and Vista and 7 installs alike. I blamed Vista at first and then I thought 2gb of ram was the issue. 4gb of ram and 7 are no different.
 
Same thing happens on my machine, I'll close down all apps and 7.5GB of ram will still be in use causing the machine to be sluggish. Usually happens when the machine has been on for 8 days or more.
 
Adobe Flash is the main problem. I'm serious, this eats more memory than anything else aside from video editing software.

Youtube and flash ads will easily 512MB-1GB like it's nothing.

Go to bliptv and watch a 1+ hour flash video, it will eat 2GB+ of physical RAM.

On my netbook, I have 3.25GB usable memory and when watching flash in Firefox I can eat away 2-2.5GB of memory depending on what I have open in tabs and which flash videos have opened.

This isn't Vista/7's fault, it happens using OS X and Ubuntu as well. Flash just eats a crap ton of memory if left unchecked.

My Ubuntu installs usually only eat about 300-400MB of RAM, but as soon as I load some flash videos, I can easily eat all of my memory and some of the page/swap file.
 
You need to fire up RAMMap and see what exactly is using the memory. If you post up a screenshot, I'd like to take a look at it.

Windows has several memory lists that it uses. The active list is for pages that are active and locked in RAM. The standby list is for caching or to create a "bridge" between page file and RAM (for the lack of a better term). Items are added to the standby list if they already exist on disk (ie, executables, DLLs, other files) OR if they've been swapped to the page file. At that point, when the OS requires pages in physical RAM, it will immediately zero out the needed pages (moves to the zero list) then make an allocation from the zero list to the active list. This process is nearly instant.

If your machine is using all of the available memory, you need to see what's consuming it and why. It could be that it isn't superfetch at all, but a driver memory leak or something else causing the machine to page out.
 
You need to fire up RAMMap and see what exactly is using the memory. If you post up a screenshot, I'd like to take a look at it.

This.

Also, you'll see your web browser eating a ton of memory if you have any flash loaded at all. I've seen firefox use over 3GB of memory before just from flash.

FlashBlock + NoScript = low memory usage and secure firefox. ;)
 
You could go into services and disable Superfetch. I recommend leaving it on but at least it would give you an idea if Windows caching is causing your problems or an application your running.
 
RamMap can answer all those questions: it'll show not only the total being used by SuperFetch but also you can see every single item that's actively sitting in it and being cached, as well as dumping the cache manually too.
 
well I downloaded it so what do you want see? btw after playing a game 1100mb got freed up and stayed that way so not all of it is cached now. and I had left everything running when I started the game too.

and to be clear this isnt a problem all the time. it only seems to occur a couple of times a day. its like the perfect storm of all the memory being cached and then me opening up a new program or even copying a file. while any of that is happening doing basic things like just clicking on a tab in FF will be a bit sluggish. its appears to be an issue of having to hit the hd when the hd is already being used.
 
Last edited:
fraps loading videos = Hard drive. IMO get another stick personally... I don't think ive ever had ramp problems on my machine...
 
well I downloaded it so what do you want see? btw after playing a game 1100mb got freed up and stayed that way so not all of it is cached now. and I had left everything running when I started the game too.

and to be clear this isnt a problem all the time. it only seems to occur a couple of times a day. its like the perfect storm of all the memory being cached and then me opening up a new program or even copying a file. while any of that is happening doing basic things like just clicking on a tab in FF will be a bit sluggish. its appears to be an issue of having to hit the hd when the hd is already being used.

But your theory doesn't make sense, Windows doesn't 'hit' the hard drive when it frees the cache. It does not cache writes (by default), so it does not write everything to the hard drive when it frees the cache. Like I said, I've never seen this on my machines, but I use internet explorer, and flash (if the others who posted are correct) may not be optimized in the other browsers, or could be some other software you use. Did you perhaps enable 'advanced caching' (or whatever it's called) in disk properties in device manager?
 
well when all the memory is in cache then the hard drive is the only place it can temporarily get it from. every time this happens I can hear the hard drive working trying to open up whatever program or movie. again this does not happen when all the memory isn't taken up in cache.

yes I have write caching enabled. do I need to leave it like that or uncheck that option?
 
If you are recording video using FRAPS on top of using Firefox and other programs for days on end, 4GB is not nearly enough. 6GB+ is the minimum for any video recording at 1280x720. Even if the resolution is below that, 4GB is pushing it.

Also, going with RAID 0 will really help with transfer speeds, or upgrading to WD Black 1TB drives as those are much faster than the 640GB models with 320GB platters, assuming you can afford it. Also, a SSD is king when it comes to video recording, rendering, and writing and creation.
 
no I dont use FRAPS very much. I do take lots of pics with it but only an occasional short video.
 
well when all the memory is in cache then the hard drive is the only place it can temporarily get it from. every time this happens I can hear the hard drive working trying to open up whatever program or movie. again this does not happen when all the memory isn't taken up in cache.

yes I have write caching enabled. do I need to leave it like that or uncheck that option?

Yes but it should not be slower with the cache full, as with the cache empty, it has to get everything from the hard drive anyway. It should be faster with the cache full, that's my experience as well.

Yes I would disable write caching, as what you're describing sounds exactly like a write cache symptom (might not be though, dunno for sure). Freeing cache, then having to wait, would be something I'd associate with a write-cache, and if you don't like that, then disabling the write cache would probably be the solution.
 
well I am reading up on write caching and it seems having off will make things even slower. :confused:
 
Yeah, just turn it off for testing, it won't actually make things faster, just more unstable. Basically it just tells windows to not write anything to the page file and only writes to system memory instead, but if there is a power failure, it can potentially be dangerous.
 
Both taking screen shots and recording video will cause your HARD DRIVE to stutter... It's not your ram I'm telling you..
 
Both taking screen shots and recording video will cause your HARD DRIVE to stutter... It's not your ram I'm telling you..
yes but I am not talking about that. I am only talking about opening my FRAPS folder to view videos or screenshots.
 
well I am reading up on write caching and it seems having off will make things even slower. :confused:

It will make writes slower. But that's the trade off, you either get fast writes with a slowdown when you free the cache for programs, or you get slower writes and fast cache clearing (plus stability, as write caching can cause your data to get hosed if the power gets cut or the system crashes.)
 
turning it off made no difference. all but about 15mb was in cache and I started looking at pictures in Window Photo Viewer and I monitored the task manager while going through pics. sure enough at some point I had no free ram and I had to wait for pics to load. as soon as some ram would get released all pics would load fine and fast. and again as soon as the free ram was at zero I would have to wait while it said "loading" and could hear the hard drive having to work harder.
 
not my experience on any Windows box on any machine I've used sans some Vista ones.

What does the memory tab in task manager look like?
 
Try rebooting with it off, and see if it happens again. I doubt windows clears the write cache when you uncheck the little box, more likely it just doesn't cache any MORE writes. so you still have lots of cached writes waiting to be written, and need to reboot to start afresh.
 
well I might have to resume this tomorrow since I need to play some games for a little bit and then get to bed.
 
ok I got curious and rebooted to see if it would help. I dont know if that setting is supposed to have any impact on booting up but that was the slowest I have ever seen. I swear it loaded one icon at a time and took over a minute for 6 FF tabs to finally load.

anyway that setting made no difference and if anything feels slower once that ram gets cached. after playing around a while most of the ram was cached so I opened up a 30 second FRAPS video while monitoring the task manger. just like before, it stuttered and skipped a bit as the free ram disappeared and then played smoothly when there was temporarily enough freed up ram.

this is not just my pc because I can recreate this on my friends comp just the same. again once all my ram is cached, some things are sluggish because it is so slow to release the ram back when I need it.
 
Last edited:
Well let's try something else then. Have you installed all the latest drivers for your devices? Have you made any other tweaks to the system? (n-lite, disable services, etc?) Have you tried disabling all unnecessary background programs and see if it still happens? You might also want to look in the event log to see if anything strange is happening. Maybe try different SATA cables (never know...) Are you overclocking, if so try running at stock everything as well.
 
The problem is that people think that Windows 7 manages memory the same way Windows has always managed memory.

This is not the case. Windows 7 purposefully consumes as much of your RAM as possible because, obviously, I/O performance of RAM greatly exceeds that of virtual memory (your page file). Additionally, used (or, non-free) memory does not equate to unavailable memory. Windows 7 reserves large chunks of RAM and keeps it available (in standby) for applications that need large amounts of memory at a moment's notice. On top of that, Windows 7 also prioritizes pages of memory based upon what is regularly accessed, and changes its reservations in memory accordingly.

So seriously, stop freaking out that Windows 7 is using all your memory. Unused RAM is wasted RAM, and wasted performance. Windows 7 will recognize demands by system applications for more memory, will track the needs of the applications, and will manage your memory accordingly.

Here's a good article on the subject: http://www.zdnet.com/blog/bott/windows-7-memory-usage-whats-the-best-way-to-measure/1786

If you're running into problems, you don't have enough memory for your applications, it's as simple as that. Both FRAPS and games like Call of Duty require huge chunks of system RAM. If the system is running out of physical memory and is resorting to using your page file for I/O-speed-dependent applications, the problem is right in front of your face. You need more RAM!

EDIT - Also, if you're recording with FRAPS at a high resolution, a very large amount of data is getting processed and written to your hard drive after passing through memory (where it's held while the CPU handles encoding). What kind of hard drive do you have? If it's struggling, you may need a higher-performance solution, or you may need to take a look at drive fragmentation as a possible issue.
 
Last edited:
Electrofreak, you really need to read more carefully. I know 7 is supposed to use all the memory but the problem is that it does not get released fast enough when I need to open up something that is not already cached.

and you devil22 obliviously keep missing the part where I said this has been and still is an issue on any pc. it has nothing to do with my specific pc and I can recreate on any pc. at least on those with 4gb or less. my friend said his pc didn't do that and I quickly showed him that it does.
 
You're missing the part where everyone in this thread has told you it does not happen on their PCs. I've never seen memory caching negatively affect speed at all, let alone make FF take 1 minute to load.
Maybe you could make a video, show your task manager with the memory full, then open FF or something.

Alternatively, you could email Mark Russinovich, and explain to him that Windows is messed up. I'm sure he'd love to help you if it's a legitimate claim. (he's answered my emails in the past about this and that.)
 
Last edited:
and if I had your pc right in front of me I could easily make it do it on yours. I have proved this on about 10 comps now with Windows 7 or Vista, 32 or 64 bit, and with various hardware.

I have made a video and it will show exactly what happens as the memory will not get released fast enough. I have already explained what the video would show anyway and if I post the vid all I will get are replies saying its something wrong with my pc so whats the point?
 
I have 3 PCs in my house. My HTPC with 4GB, my gaming rig with 6GB, and my laptop with 16GB. This doesn't happen on any of them. Ever.

Are you running Win7 32 or 64?

I recommend running perfmon and capturing some log data. I'd be happy to take a look at the performance counters. Capture these counters. Set it to capture every 5 or 10 seconds and to capture for an hour...then try to duplicate the problem.

  • Logical Disk sec/Write (All disks, NOT Total)
  • Logical Disk sec/Read (All disks, NOT _Total)
  • Current Disk Queue Length
  • Logical Disk Writes / Sec
  • Logical Disk Reads / Sec
  • Memory - Pages / sec
  • Memory - Available MBytes
  • Memory - Page faults / sec
  • Process (All instances) - Private Bytes
  • Process (All instances) - Working set
 
Also, if you're able to duplicate this across multiple PCs with the same applications, it's probably application related and not anything to do with Windows.
 
and if I had your pc right in front of me I could easily make it do it on yours. I have proved this on about 10 comps now with Windows 7 or Vista, 32 or 64 bit, and with various hardware.

I have made a video and it will show exactly what happens as the memory will not get released fast enough. I have already explained what the video would show anyway and if I post the vid all I will get are replies saying its something wrong with my pc so whats the point?

The point is, we will have a better idea of what you are talking about. Having never seen this on any PC ever, can you blame me for not thinking you are describing the problem correctly?
 
I am closing this thread. while I appreciate the help, the canned responses that it is my pc are getting ridiculous. how many times do I have to explain that this has been an issue on various comps with 7 or Vista?
 
Status
Not open for further replies.
Back
Top