# Disable windows 7 cached memory (mapped file)



## RoutedScripter (Aug 19, 2010)

*[Updated] Disable windows 7 cached memory (mapped file)*

Is there a way to disable this cached memory, via hack or whatever.

I've just searched web and nothing yet, just the kind of "wannabe pro" articles out there "no you don't want to disable superfetch it will make your ram useless bla bla bla" or "why disabling pagefile , the application allocates hunks of memory bla bla bla" 


The common belief out there that the performance benefit is huge with this caching of physical memory , because of "unused memory is useless memory" belief , yes , microsoft said that when noobs come using win7 and vista , and the pagefile stories , i heard it all , most of people say "why would you disable it" , thanks for help , it doesn't MATTER why , im a PC enthusiast , a tester , i want to do things like this for a challenge!

IT AINT WORKING that's why , all these things , just hog the memory , i want memory CLEAN for other processes such as games, because one game freezes on me and that's because windows 7 doesn't flushes the remaining standby memory , is it 250 or 140 MB , there's always some USELESS cached(read inactive) memory in there still not getting out of the way














Pagefile disabled
ReadyBoot disabled(not readyboost)
UAC disabled
Simple file sharing disabled


*Service mods:
*
Application Experience = Manual  ;;; Current = Manual
Security Center = Automatic Delayed ;;; Current = Manual
Software Protection = Automatic ; Current = Manual
Offline Files = Automatic ;;; Current = Manual
Homegroup Provider = Manual ;;; Current = Disabled
Windows Modules Installer = Manual ;;; Current = Manual
Windows Search = Automatic Delayed ;;; Current = Disabled
Windows Update = Automatic Delayed ;;; Current = Disabled
Windows Firewall = Automatic ; Recommended = Automatic Delayed ;;; Current = Disabled
Windows Defender = Automatic Delayed ;;; Current = Disabled
Windows Media Player Network Sharing Service == Manual ;;; Current = Disabled
Superfetch == Automatic ;;; Current = Disabled

REMOTE DESKTOP CONNECTION;

Remote Desktop Configuration =
Remote Desktop Services =
Remote Desktop UserMode Port Redirection =
Workstation = Automatic ;;; Current = Manual


*
Registery mods:*

MemoryManagement on HKLM SessionManager: 
PreFetcher = 0 from 3
SuperFetch = 0 from 3
DisableMemoryPagingExecutive = 1 from 0
SessionPoolSize , from 4 (4) to 30 (48) MB
SessionViewSize , from 30 (48) to 40 (64) MB
SystemPages , from 0 (automatic) to 40000 (262144) KB



Seems that this is in the KERNEL is self , whatever it takes , i want to get rid of cache modified ... why does modified not write to the HDD immediately , i don't care for "fast" access. 

I must see both settings in my eyes on my pc , then i will reenable caching if maybe caching is better, if there would be some control over this to set the quota/limit , didn't yet played with the pagedpoolsize and nonpaged ... will try later.


----------



## W1zzard (Aug 19, 2010)

i read your post 3 times now and you seem to be talking about multiple things ?

exactly what do you want to disable?


----------



## <<Onafets>> (Aug 19, 2010)

W1zzard said:


> i read your post 3 times now and you seem to be talking about multiple things ?
> 
> exactly what do you want to disable?



I think he wants to disable pagefile and everytime a program is closed all its remains wiped from RAM.


----------



## OSWiz (Aug 19, 2010)

Well, you can't really delete the pagefile for long, and its always in use.  As soon as Win7 attempts to write the pagefile, and discovers it is missing, Win7 will recreate it.  This is true all the way back to at least Win2000, maybe further.


----------



## mrhuggles (Aug 19, 2010)

page file doesn't usually hurt anything anyways, it can be important for when a program or game allocates memory that it doesn't even actually need
also cache doesn't work how it used to, its no longer freed when its needed the memory counts as free already so if a program uses it then it gets used by the program directly, if you must then experiment with things, wouldn't that stuff be settable in system.ini?


----------



## RoutedScripter (Aug 20, 2010)

just lost a ton of text , will explain tomorrow , precious explanations LOST IN 2 HOURS of writting then i post and then "you're submission could not be processed , logged in before page loaded"  

im writing on another pc , that's why the login issue, how can i save the text , i have  , is it still in the FF cache?

and i got it all fine and shine everything from top to bottom , this is happening regularly , los of forum text gets lost , blizzard forums are crap , those damn edits there don't apply , lost tons 3 times this week , there isn't a thing more nerve racking , while you spent writing for 1 hrs at 2 AM.:shadedshu


EDIT: Oh well , it happens to pay off if you have nerves of steel and strong will. 





the text is scattered , need to assemble and find it all first, stay tuned tomorrow.

Learned something; never going to reply on threads on PCs except my own, and that cmd program is quite cool !


----------



## twilyth (Aug 20, 2010)

unless you're on a PC where you can't write files, pull up notepad and copy your text to there every 10 minutes or so.  It's a llittle bit of a pain, but not much.  Just alt-Tab your way to the next window (notepad) and back.


----------



## RoutedScripter (Aug 20, 2010)

Recovered text:

See the images, .."Cached:" or "Standby" (dark blue) , or "Mapped File"..That's what i want to eiher , lower it , manage it , or completely disable physical memory caching "memory that is inactive"..I would be most thankful to you Wizzard and the whole TPU for this , i was always thingking how to control this since i love to tackle things like this but there was no "hack" or anything usefull on the web , i've tried many things my self and still no...

I've been reading on wiki also , this mapped files are chunks of data , but how , i disabled superfetch , which most sites and forums already suggested , for example "standby = superfetch" yet standby doesn't want to go away , these screens are from my pc secondes before posting this thread...

Isn't TPU creating GPUZ them selfs , yep the admin i know , so why not make a "win7 memory gladiator" or "RAM-Z" (that would be a good name for info tool though) or maybe "Windows memory control and customization tool" MCC-T or how you want to call it without using exaggerations(ultimate,total,domination,...that bsware that never works)  , that would SMASH those kernel forcables , i want to have my custom control over how windows caches ram and does whatever with it, for whatever purpose!..

I know buying another 2 GB ram will save my issue with gaming but that's not a complete excuse , first , im doing this enthusiastically and i will suppor this thread and offer my help if you guys can help me out , im not hacker on forumz where they talk these hi-profile things (because goofle only finds popular not necessairly useful stuff , i would have to search for weeks , but i already did in a course of half a year) , the second is , i don't even have resources to afford another 2 GB ram since i already both 2gb 3 months ago , and i don't have more slots , so 2x 1gb would have to go out and i would have to buy 2x 2 GB ...

 anyways , how can i help , anything ,  i would be very proud if i started an idea and then other people would saw and if things move on actually use this results , since i was never able to explain to people how damn MS advertises it's "memory management" that people on msdn actually believe and thing games will run faster , come on , i saw it first hand , SC2 is unplayable for first minute with pagefile , loading times 10 seconds longer , longer windows logon about 10 sec , people say pagefile is a way that applications allocate their addresses to it but don't actually use that chunks , that's MS description and it does not work that way , or another one "pagefile is used when the system is running out of physical memory" this is another false belief , if it would be working like this it would have behaved totaly differently and i have PRACTISE that's why i see this, why can't they figure out , the whole web is going on with the same things , will i be one single guy to figure out how pagefile is AGE old tech and it does NOT work like described by MS.

Whatever they do , the method is the same , it's on the HDD , period , they can do optimizatios , super code duper extra how they want , there only needs to be a few megs on the HDD and the whole game cripples to a halt , and because GAMES are so intensive and unpredicted , they're fast and need those "inactive bytes" in pagefile lot of times, so it's a lot of disk operations , ..

Games don't know what to put into pagefile , what is put is put by windows kernel , it never works like it needs to , sending only the empty addresses to the HDD , no , there is still something in the HDD what game needs , either is a few bytes of text, or a whole file , or just empty addresses that need to be loaded by the process just so  it processes the code so it knows it actually exists, or maybe goes through a scan of sort that requires all the ram allocated to be checked and that would include pagefiled addresses empty or not , who knows , what i know is in practice here (but i can prove my self with theory too ) , and it doesn't work nearly as how it does in theory...I don't know how they bench the OS , it wasn't never made for games and thrill seekers alike...

If this idea is brought up , you can also do (already have multiple ideas) , a feature that would force windows to think it has less memory than really installed , so it would run in a 300 MB mode with all of the ram available for anything else. ..If you install only 512 MB of ram , physically , the windows will run adapted to that amount , as one article confimed , win7 can run half-fine on 300 MB , but of course when you get to this you experience performance decreases and slowdowns..


Explanation of "fast access" (standby") , for a game it is useless , but i don't mind it being when i only search web and normal stuff , see , the game uses the memory how much it needs, ...
We bring all this down to the fact that this memory management on win7 wants to fix the decrease what pagefile made , probably even going to cache the pagefile it self ,  which is not perfect to say at least , cache will be like RAMMAP explains "mapped file" in parts , ex. we have a cached file in "standby" in physical memory from the pagefile (sounds funny) , so even if you cache the pagefile to possibly help the situation  , one part of that example file will still be on the HDD in the pagefile , what microsoft did with win7 was to improve these memory optimizations to help cover the pagefile , but in half , that's why XP has this problems more of an issue and win7 has like half less issues with lag/unresponsivness , but im damn 10years on PCs, i spot even slightest lagfests,...
because i disabled pagefile , this memory caching is hogging up memory for no use , with no-pagefile i gained fast access , i don't need memory hogging optimizaions while playing games , but i can say it may be useful when multitasking on desktop, might as well be fine , that's when we need pre-loaded stuff , when you do with a lot of small files and processes , the game as a single process already loads all the data files into it's one big chunk at ONCE , we don't need to help it and pre-load stuff that is no longer used by the game , we just want to get out of the game way and let it do it's own management.

Im starting to think that maybe cache wants to preserve data what the game used and in a previous mission , and dropped it when loading the next one , because games are like this , the game won't use something it hasn't already loaded (unless it's a crappy game) , and if you hog it with usless data , the game in the next mission needs more space for current data , and that's why i get SC2 freezes only in SP missions after 1-2 hours play , either it's a sc2 memory leak or cache has to have it's nose into it , there's a big thread on sc2 forums exactly on this, but it didn't got very far, solution for them was "enable pagefile" for me not ,so i got them correct and thanked , and while i agree it is a way but just "unacceptable alternative" for me , but the LAG and PERFORMANCE is ahrg , can't play like that.

You don't even know i had an old interspar(omg) PC for like 5 years of hell (wasn't even my pc) , 3 year ago , it was virus,lag,bsod,overheatin,lag,freezing,right-click-lag,low voltage spikes,shutdowns,lag,parents yelling,saftey catch removed,no power !!! don't i deserve some damn lag-free and peace now ? 

MRHUGGLES thanks for idea , will try it tomorrow, get up some ideas and interest guys maybe were getting new tpu app


----------



## caleb (Aug 20, 2010)

Sorry but when you spam everything what comes to your mind as text in a post its very hard what you want to do.
From what I understood you would like to manage cache so windows goes all the way to memory.

PC's aren't smart and cannot tell what to do with data simply looking at it like humans do. They need to be programmed to do so. And OS's memory management has to be ready for every possible scenario that can occur (what ever you throw at it) that's why we let OS decide what to do and when and give it an option to put stuff to HDD in the event of running out of physical memory. If you want strict per task memory management coded strictly for one customized task buy a console.

Messing with windows memory settings is IMHO a lame thing to do. Windows isn't open source so you can't really tell if it helped or not just because your game loads faster as the setting can affect 100 other processes which might slow down the overall PC performance in certain scenarios. 

As it's gonna take a while before us humans figure out a machine that will think by itself you have to satisfy with SSD's which solve most of the memory/storage performance issues.


----------



## RoutedScripter (Aug 20, 2010)

Im willing to support this if this is even possible , i know it's a wall of text but still better than nothing,


This is a challenge whatever it takes , really not caring about any of the consequences and what might be a side effect on other (read useless) processes.(except a single big process)

will you help ? , maybe it would turn out simple,  but one man can't notice everything , so with a combined strength of the community we might get some results, why would Win7 want to force memory caching on us who don't WANT it for our personal reasons , this thing is good for multitasking office use and not for things that I do.

It doesn't matter , game or a big process , it's the same but i tell you the true reason , i could be excusing and telling you i run AUTO CAD or photoshop , whatever just because i want this for games doesn't mean it can't be used for other stuff and doesn't mean i don't know what im talking about.

if anyone's willing to help offer suggestions where would we look , for example system.ini , i don't know yet , but will look into it.


----------



## mrhuggles (Aug 21, 2010)

did you already try the usual way to do it?the way that was the same in win98 and winxp? the 386 enhanced section of uhh, i forget the name of that file i think something.ini like winsomething.ini prolly...


----------



## LAN_deRf_HA (Aug 21, 2010)

If you're getting freezes after disabling the page file then don't disable the page file. You should never disable the page file frankly, too many random programs spit out errors if you do.


----------



## slyfox2151 (Aug 21, 2010)

page file cannot truely be disabled... windows will create a new page file even if you set it to disabled.


----------



## RoutedScripter (Aug 21, 2010)

slyfox2151 said:


> page file cannot truely be disabled... windows will create a new page file even if you set it to disabled.



Where , i didn't found it , and diagnostic programs don't show everything


in practice , it's a totally different feel without pagefile so i would be suspecting a hidden one if it haven't made a difference in the first place.

This thread is not about the pagefile anyways , i just mentioned it i alread dealed with it and it's out , because of memory customizations , you can't be sure until you have fixed memory ammount and see it in raw without microsoft crappies behind.



LAN_deRf_HA said:


> If you're getting freezes after disabling the page file then don't disable the page file. You should never disable the page file frankly, too many random programs spit out errors if you do.



Im not getting em , it's STARCRAFT 2 that has the memory leak in singleplayer campaing (MP is fine) , and windows 7 memory caching (standby and modified) does not RELEASE enoguh memory for the process to take , this would just BUY me more time playing , it does NOT fix the game's memory leak

Surely am i only here who knows what is the idea here? i should have posted this to hacking forums , but i don't know any.


----------



## RoutedScripter (Aug 21, 2010)

TO be honest i don't think that's going to be possible with a few registery edits or tweaks , i think this will need to twinkle with the kernel which i don't exactly know how nor does a lot of people ....


----------



## RoutedScripter (Aug 23, 2010)

Well i , guess am lucky , and just bought 4 GB ram , (2 1gb sticks need to go out) and with 6 GB memory , will see how it performs this time.

Not that i have huge money to spare , but i was going to need it anyways , Doom4 , Crysis 2 and Rage approaching , and maybe even DNF , that's hungry so i snatched some DDR2s until the stocks dry up in favor of ddr3.


----------



## Solaris17 (Aug 23, 2010)

/


----------



## RoutedScripter (Aug 24, 2010)

Damn i hate this "obstructions" win forces on us , freaked out when SC2 freezed another time today 

Ram usage was 86-92% , that's the CPU meter , and of course these nubmers are without memory CACHE (standby,modified,mapped file, however you want to call it it's the same thing)

reset
ff
local webshop
ram ddr2
Dominator 4GB 1066 cl5
add in cart
buy
ok stock 
done 


I still do have interest in this but until somebody that has more knowledge with this shows up or whatever, Wizzard didn't got back yet or maybe he doesn't understand me  ...


Win7 , you want more ram ?  YOUR GETTING IT NOW. Dammit!
Comfy?


----------



## RoutedScripter (Aug 26, 2010)

Success







PROOF it is possible i was telling all the time , win7 just doesn't want users to be messing with it.

One note: it slowly increases by time , .... you have to keep emptying it. 10 min and it's 70mb

Found it by accident 1 hour after installing and setting up more ram today :shadedshu

But im happy anyways


----------



## Frick (Aug 26, 2010)

Wait, wouldn't this be an issue related to Starcraft 2?

Also, did that made a difference?


----------



## RoutedScripter (Aug 26, 2010)

Frick said:


> Wait, wouldn't this be an issue related to Starcraft 2?
> 
> Also, did that made a difference?



It was an issue at first but not related/dependent, but that's on bnet forums ("sc2 cut scene memory leak confirmed") , the idea is that Starcraft 2 Singleplayer playing throught missions is having memory leak and it some time it freezes my pc with 4 gigs , i can load multiplayer 4v4 spam units and structures and it does not freeze/run out of mem.

This is not related directly (hence the thread title) , it's just the fact that stanby/modified was eating valueable RAM for caching instead of freeing that RAM for the game.

Since i discovered this after i installed ram it's a pity i didn't try it when getting close to freeze @ 4 GB ram total (no pagefile don't forget)

I have yet to try how will SC2 play now with 6 GB RAM, stay tuned.


----------



## RoutedScripter (Aug 28, 2010)

Starcraft 2 runs fine with more ram ,  it turns out that it needed about 70 MB more , a commit charge of 4145 MB , but 4GB is 4096 MB.

I checked this with most action in a singleplayer mission , full map of zergs.











The last image is where tried to see what happens if you empty working set/sys working set, but it would clear a few 10 megs but don't expect much here of course


But this is the game's fault which i have a discussion over on bnet forums , so as far as im concerned this thread is solved. (incase someone wants to do something more im ready for a challenge)


----------



## AphexDreamer (Aug 28, 2010)

I'm a bit confused. Doesn't the cached memory you want to free get freed when you run a program or game that needs to use it? Why would you have to get rid of it yourself if it does that?


----------



## W1zzard (Aug 28, 2010)

read up on how cache manager works first, once you understand it, ask yourself if you really want to disable it
http://codesurgeonblog.com/2009/11/windows-cache-manager-quick-overview.html

memory mapped files are a base os function related to file access .. google it up

disabling the pagefile is actually counter productive when memory is low. with pagefile enabled windows will page out memory pages that havent been used for a long time (which means they probably wont be used soon). 
in windows 7, the memory manager will page out least-recently-used pages of a program that seems to be continously growing because of a memory leak (like your star craft 2 example).
if you a running something like the print spooler service and never use it it will get paged out to disk ONLY IF YOU HAVE A PAGEFILE. otherwise it will always consume memory that could be used as disk case or for currently active applications.

read up on how "working set" works in the windows nt architecture. the number you see in task manager for memory use is not really accurate

windows internals books from microsoft press are also a great read, or look for mark's recent presentations


----------



## RoutedScripter (Aug 28, 2010)

AphexDreamer said:


> I'm a bit confused. Doesn't the cached memory you want to free get freed when you run a program or game that needs to use it? Why would you have to get rid of it yourself if it does that?



Yes it does get freed , the standby does get freed automatically , i was at first thinking that starcraft 2 was not working because of this but it turned out it's solely a starcraft 2 leak rather than OS being faulty.


----------



## drmurda (Sep 6, 2012)

Having a similar problem with World Of Tanks. I have 16gs atm.... Im about to run out a buy 32 hahahaha. ive re-installed the game several times with no luck. Zero mods. Did a mem test and it was ok. Only thing left to do is re-install fuking windows.. but im not sure I want to wast my time doing so.

http://i363.photobucket.com/albums/oo73/drmurda/Resmonitor1.png

http://i363.photobucket.com/albums/oo73/drmurda/resmonitor2.png


----------



## RoutedScripter (Sep 7, 2012)

drmurda said:


> Having a similar problem with World Of Tanks. I have 16gs atm.... Im about to run out a buy 32 hahahaha. ive re-installed the game several times with no luck. Zero mods. Did a mem test and it was ok. Only thing left to do is re-install fuking windows.. but im not sure I want to wast my time doing so.
> 
> http://i363.photobucket.com/albums/oo73/drmurda/Resmonitor1.png
> 
> http://i363.photobucket.com/albums/oo73/drmurda/resmonitor2.png



Now that is one big memory leak ...

You don't need to waste money on more RAM, the game is either bugged or there's another thing wrong going on, but judging that you posted both images it's really looks more like the game's fault.

You need to contact the developer and show them this first, but first of all you'll need to to a bit of research before being sure that it's the game's fault.

Get back with more specs if you can, CPU-Z all tabs.

You can't just buy more RAM unless you have to replace sticks depending on the, unless you're know what your doing but if you know what you're doing you would have thought that the giant 6GB of RAM is more likely a memory leak than actual memory consumption. Looking at the exe it only has ~388 MB of commit (which is the number that counts how much of RAM it takes) ... that shouldn't take 6GB obviously. 
Never played it but I know World of Tanks is some kind of a web game with a download ... 

This isn't the corect thread however.


----------



## RejZoR (Sep 7, 2012)

Do you have all the RAM so you DON'T use it or did you buy it to be used all the time? Cached stuff gets purged as soon as system requests more memory so there is very little point in disabling it.


----------



## ShiBDiB (Sep 7, 2012)

RejZoR said:


> Do you have all the RAM so you DON'T use it or did you buy it to be used all the time? Cached stuff gets purged as soon as system requests more memory so there is very little point in disabling it.



By very little he means theirs 0 point to disable it.

And I'm just guessing were talking about a page file.. Cause your posts in this thread are the biggest clusterfuck of confusion I've ever seen on these forums, you put spam bots to shame when it comes to making sense.


----------



## Steevo (Sep 7, 2012)

W1zzard said:


> read up on how cache manager works first, once you understand it, ask yourself if you really want to disable it
> http://codesurgeonblog.com/2009/11/windows-cache-manager-quick-overview.html
> 
> memory mapped files are a base os function related to file access .. google it up
> ...




I believe he thinks the "cached" part of system RAM is being used and not allowing processes to use the memory, even though it is free if a program requests or need to use it. 


The memory manager in Windows 9X environment was the one that would never dump leaking programs and caused all sorts of issues, including duplication of process in RAM and on Page file. Windows XP was significantly different, and yet again Windows 7 and 8 are yet again much superior to allowing individual programs and users to try and adjust memory quotas.

In short, just like W1zz said, don't disable anything like page file, or superfetch. Instead place them on the fastest disk you have available at 2-4X the amount of RAM you have installed for normal users at a static size when you first install windows and it will be fine.




drmurda said:


> Having a similar problem with World Of Tanks. I have 16gs atm.... Im about to run out a buy 32 hahahaha. ive re-installed the game several times with no luck. Zero mods. Did a mem test and it was ok. Only thing left to do is re-install fuking windows.. but im not sure I want to wast my time doing so.
> 
> http://i363.photobucket.com/albums/oo73/drmurda/Resmonitor1.png
> 
> http://i363.photobucket.com/albums/oo73/drmurda/resmonitor2.png





You realize all those "huge" numbers are in KB?


I fail to see any issues other than it being a alienware.


----------



## RoutedScripter (Sep 8, 2012)

Guys this is an old thread the guy brough up asking some offtopic question.


----------



## henry2k (May 6, 2013)

Had the same problem, System is "eating" memory to put some parts of a 15GIG AVI into memory (for a single video encoding pass) and win7 isn't releasing this memory by itself, chrome swapped nearly everything, webpages took ages to load and programs will load (from ssd) in minutes instead of seconds, by "clearing" the standby-memory (with rammap) my system got 2.2GIG ram back and everything was fast again.

I'm some of the persons who never (ever) restart windows (until there are updates that requires restarting) and i'm asking if there is any program that will periodically clear this standby-memory for me... because this is not the first time this happened to me that win7 tried to squeeze a >10GIG AVI into Standby-Memory (for faster access... haha... very funny... its one giant AVI thats processed from top to bottom once and after that never used again).

Or can i tell win7 to NOT cache AVI-Files into memory?  At least not a 15GB AVI thats meant to be reencoded from lossless to h264.


----------



## RoutedScripter (May 8, 2013)

I got my new install and set up the optimizations and config to disable most of the what I did before but ofcourse it's the same dynamic memory management has 8GB in standby, this is when I ran a few days and games/apps.

I just wish someone would find the configs in registery, it's weird this would be left locked down to core development. 


I now have a new PC with 16GB so it's not a problem anymore for me, I realized the idea of stanby memory as a good thing but when it's not releasing that for other more important things then that's the problem which would want someone to disable it completely to avoid that.

Although photoshop and premiere did take a huge chunk at one point it went past 16 but that was just one moment, i did a lot of editing but it was just some small mp4 vids and jpg pics. But then again I did not check the memory slides so I don't know how much of it was , I can confirm that for some reason it did jump like 6GB-8GB up and down from to 16 and down, not sure if that was mem management or the apps, if I see it happen next time I will keep my eyes open.

I immediately though about it though, not realizing this thread but the fact that how the heck could it run out, or maybe it was some kind of memory leak, it was running for 3 days already I think so it could be that effect.

But I did realized more how much windows doesn't like running for long, sleeping makes a ton of mess in windows/Temp and maybe elsewhere.


----------



## natr0n (May 8, 2013)

What a nightmare of text and confusion in here.


----------

