Strange problem with memory usage

question13

Distinguished
Aug 25, 2007
36
0
18,530
I have win 7 64 bit and have noticed that once my PC is active for more than a few days, the idle memory usage goes up dramatically.

See pic, even with only idle processes, i am using 49% of 4gb ram. When i resart my PC, idle memory usage goes down to around 25%, which is a much more sane number.

Ive tried using a memory cleaning program called "CleanMem", but it doesn't seem to do anything...any ideas on what could be causing this?

TJorq.jpg
 



Programs including the operating system figure unallocated memory is fair game and they prefetch data to increase their apps/OS performance. This is normal operation.

Abnormal causes would be memory leaks, handle leaks in software. To figure these problems out you have to look at the thread count, handle count and memory usage of all the applications. Generally these type of errors don't stop their increase in resource use until all the system resources are used That is why I would suspect prefetching and cache data to be using your memory (nothing to worry about unless it is causing a problem for you)
 

question13

Distinguished
Aug 25, 2007
36
0
18,530


Huh?

And im using AVG free.

john : it is causing a problem because windows and other programs runs very slowly when this occurs, and i have to restart my PC to get it to run normally again.

For example, if it's using 49% on idle, the memory usage skyrockets when i open any actual programs like firefox or a game. And then everything slows to a crawl.
 

question13

Distinguished
Aug 25, 2007
36
0
18,530


Why? Are you saying AVG free is causing the problem?
 

question13

Distinguished
Aug 25, 2007
36
0
18,530
Uh, okay...but what is causing the memory usage? It doesn' seem to be a process, because it would be listed in task manager...
 



make sure you are not looking at a OS performance perk artifact
(check to see if you are running superfetch service or readyboost some info:
http://www.osnews.com/story/21471/SuperFetch_How_it_Works_Myths)

if not the above then continue below:

you need to find your memory pigs: got to www.sysinternals.com
download their tools. (Microsoft bought the company and the tools are on the website for free)

tools of interest:
use autoruns.exe: help disable programs you don't want to run
use procexp64.exe or procexp.exe for 32 bit to see what is currently running on your system.

rammap.exe
vmmap.exe
handle.exe cmd line app that shows what and where file handles are open
================
for starters:

1. exit all apps and run sysinternals process explorer procexp64.exe or procexp.exe and check to see what is still running on your system.

2. attempt to configure any apps that you don't want to run in the background via the apps options. for example, tell chrome not to run in the background via setting in the tools menu. Configure adobe apps not to run its update laucher. configure java not to cache in control panel or to run it update programs. configure adobe flash player not do cache ads on your machine by using their website storage settings panel
at http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager07.html

3. after you get your system configured the best you can then reboot and run

Sysinternals autoruns tool to see what is still configured to run. Often Apps will reset to run in the background after you use them. you can see what is listed to run and disable them with autoruns.

reboot again and run sysinternals process explorer
procexp64.exe or procexp.exe
check the list and see if you think it is what you expect. lots of apps run in the background when you don't want them to. for example google chrome runs a lot in the background when you don't have a browser running on the desktop.
They cache and prefetch for when you start chrome up again unless you select a option in their settings.
===

because the memory use is moderating itself the cause is not going to be easy to determine. I would watch resource monitor memory usage, then cycle various 3rd party services. Just stop them and start them and see what resources are freed and reused.
===

there are other things you can do but that give you a lot to work with.
also, if someone tells you to reinstall, it will work for a while but you will end up with the same problem later.

 

question13

Distinguished
Aug 25, 2007
36
0
18,530
How do i check if superfetch/ready boost is running?

I'm confused about what's going on here, are you saying that task manager doesn't report memory/process usage correctly and i need the stuff from sysinternals?
 

superfetch/ready boost are services that can be accessed and controlled by control panel app. it is under administrative tools -> view local services
SuperFetch

Task manager is a bit simple and does not show all the details of running tasks
until you get windows 8. In particular, you want to look at bundled subprocesses under the service host entries with the sysinternal process explorer. There can be many services on a service host but the old windows just shows the bundle as one name.

 

question13

Distinguished
Aug 25, 2007
36
0
18,530
Okay, i have superfetch running, not sure about readyboost though.

I downloaded process explorer but the numbers are still not matching up...see the pic, 54% of 4 gb memory is being used but process explorer isn't showing anything using up that much memory.

Dbbw6.jpg
 
When you next have the problem, just open up a command box
cmd.exe as an administrator and type the command
net stop superfetch
and see if your memory is released a short time later

net start superfetch will turn it back on for you.
------------------

The process list you are looking at are the user mode processes, you are not looking at the entire memory allocations (shared) or those made by the kernel mode processes for the device drivers and the OS. Figure that the win 7 OS takes about 775k memory (about, but I would have to look it up) also not all of you physical memory can be accessed by the OS, some of it is reserved by the various hardware in your computer. (BIOS, cards, bus, chipsets, video cards). You have a lot of apps running in the background.

I would suspect that when your system goes idle the various malware and virus scanners you have become active and the Microsoft Superfetch service begins to do its work to enhance performance by building up a cache to feed to these programs. It will start slow but over a few days the service will figure these programs are the only thing running and will become tuned to enhance the performance of these apps until the next reboot.

When you get back to your machine and start using it these Idle time processes will be told that the system is not idle any more and to go back to sleep. It takes time for the processes to respond and your system resources to be released by the services, collected and and returned for active use again.

-look at the 3rd party apps you are running in memory, unless you know you need them. You can also just make a batch file to start/stop them when you want.

for example: using a cmd.exe you could make a batch file
with entries like
net stop "windows font cache service"
net stop "print spooler"
net stop "Superfetch"

then you could make one to turn them back on
net start "Superfetch"

- the autoruns.exe is very good at locating where strange items are being run from in your registry. It will also allow easy disable of the entries.

- some items tend to come back because they schedule a task in the task scheduler
to run a given time. Sometimes you might have to look there to find out why items
are reinserted to run at startup after you have removed them.

There are more places to look for problems but see if the above helps first.



 
They will but it is done over time as the demands on the system are increased idle processes will be swapped to your page file, there is some threshold that has to kick in before the OS starts to reduce its memory demands. As far as you OS is concerned it gets your size of your RAM and the max size of your pagefile to swap sections of memory to. It does not start to really panic until it runs out of pagefile space.. Also, a lot of the system memory is shared between processes so just grab a chunk of memory and do their own allocations out to sub processes. These get become free on their when the process gives calls a routine to free the allocations or the process exits and the OS cleans up the memory. the command Net stop superfetch will tell superfetch to shutdown, this will free any non shared memory it is using back to the operating system and
net start superfetch will start it back up, I expect it would have to start prefetching again from scratch just like you had rebooted the machine.
 

question13

Distinguished
Aug 25, 2007
36
0
18,530
Ive tried the net start/stop thing, but it doesnt free up any memory at all accoring to task manager....

Also my PC has ceased being idle for more than half an hour and my memory usage is still insanely high....it's not dropping to levels after a fresh boot.
 
Some process is using your system while idle, if your prefetching is not enabled then it would have to be one of the other processes running. Either run resource monitor while your system is idle and see where all the activity is or start turning off some of the background processes like your torrent programs, or your 3 virus scanners to help isolate the problem.
 

AtlBo

Distinguished
Jul 4, 2012
71
0
18,660
I know this is late in an old thread, but I think I have the answer this finally after worrying about it for months.

BACKGROUND. I have a W7 64 bit system that has a history of RAM issues, and this creeping RAM usage was one of them. System has 8 GB, so that should be plenty, but usage would go so high that eventually I would get an error saying the system was out of memory and everything would freeze. Two things to note here. One I had disabled the paging executive using a registry tweak I read about. Second, I had lowered the page file size to 2 GB (low)/4 GB (high). I think they were at 8 GB/12 GB before. This was a good experiment and all, and it did have the effect of the system using more RAM, but It became a runaway problem.

SOLUTION. Obviously, the solution for me was to reenable the paging executive and then to return the page file to its normal size. I had actually forgotten that I had made the changes, and I ended up taking paging all the way up to 12 GB/16 GB, which is a good bit more than it was before.

NOTE: After changing the page file size, the RAM immediately dropped like 10 points. Honestly, it couldn't have been more than 10 seconds, and it happened all at once. Not sure if changing the registry was more the cause of this or the page file size, but the PC runs very well this way, anyway, so I'm not overly concerned with trying to find out. I may test at some point.