Force everything to run from ram (no virtual memory)

inuyashian

Distinguished
Jun 22, 2011
3
0
18,510
Hi I am looking to eliminate Virtual Memory. I have 8 gigs of ram and I want to force as much as possible to run from my ram as opposed to virtual memory. Any suggestions?
 
Solution
To add a bit, Windows 7 has much better memory management and paging is very useful. It will put everything it can into memory, and other use items in the page file. You shouldn't notice much of a difference by eliminating the page file, however you
may see stability issues if you do.

Also note, some applications require a page file and may be unstable of there is not one (crappy programs, limitations...)

I'd suggest reconsidering this, but its always fun to try these things!

John_VanKirk

Distinguished
Hello,

You can do that but it's not recommended. With 8 GB or RAM, Windows will keep as much data active in RAM. Normally it does place some kernel files and other OS files there, paging them in when needed.

To do that, right click on Computer, choose Advanced System Settings, Advanced, Performance Settings, Advanced. Uncheck Automatically Manage the Page File, then in the lower portion click on No Page File. Reboot.

Will work fine, but if by chance you use up all available RAM without a page file, your system will crash.
 
To add a bit, Windows 7 has much better memory management and paging is very useful. It will put everything it can into memory, and other use items in the page file. You shouldn't notice much of a difference by eliminating the page file, however you
may see stability issues if you do.

Also note, some applications require a page file and may be unstable of there is not one (crappy programs, limitations...)

I'd suggest reconsidering this, but its always fun to try these things!
 
Solution
I always move my system cache to another drive. This way you don't have the OS pinging the hard drive at the same time you are doing other things.
You could however change the page file to something like 1 GB and it shouldn't adversely affect anything.
I also would probably continue to run a page file with 8 gigs of ram. Just not on my boot drive, in this case an SSD where real estate is precious.
 

duxducis

Distinguished
Sep 24, 2007
489
0
18,860
even thou you provided no useful info to answer your question (windows (what), mac, Linux?) you would gain no benefit anyway. Since all data loads from some type of hard disk. Disabling paging file or moving to another hard disk also gives you no benefit at all (unless u got like 30gig SSD and trying to squiz it) but that's space management not related to performance.
Windows 7 would load up most used stuff into ram anyway and leave it there,
Get fast SSD and RAM becomes even less useful i load huge programs off my SSD instant. and i got 32 GB of ram lol

Forcing stuff into ram = reading it off hard drive if its done at start up, you can actually have to wait at start up 5-10 minutes while it loads, witch is be backwards to faster start-ups. and if you after loading 5 mins try to play big game the windows will dump the ram contents and replace with game, and you end up where you started

And windows don't use Virtual memory if you have RAM space left, Programs will load ram then if it ends start virtual (hard drive)
There can be some use on start up, but its beneficial, since paging file is one big chunk, windows can load most used from it and not from 1000 places where it stored originally.

Get good SSD, or PCI express card SSD, and forget about ram!!!
 
^+1 to john-VanKirk

Disabling the page file doesn't really disable virtual memory, but it does force all of the pages that the program uses into RAM. The danger is that if you run out of RAM then the system has the potential to hang.

I have 12GB and I've been running Windows 7 without a pagefile for a couple of years now (I started with the release candidate version). On the very rare occasion that I use up all available memory the system displays a dialog box that offers to cancel the program using the most memory. In my experience killing the program eliminates the problem and the system doesn't crash.

I'm having a hard time understanding duxducis's comments, but I don't think I agree with what he's saying. Programs have to be loaded from a storage device into RAM whether you have your pagefile enabled or not - there's no difference in the time it takes to load them. Yes, they're faster to load from an SSD than a hard drive, but that has nothing to do with whether or not you're using a pagefile.

SSDs are fast, but they're still thousands of times slower than memory (SSD access times are measured in microseconds while DRAM latencies are measured in nanoseconds). Once a program has been loaded into memory you're still far, far better off if you can keep it in RAM rather then paging it out to any storage device, SSD or otherwise.
 

compulsivebuilder

Distinguished
Jun 10, 2011
578
1
19,160


Given that this is the Windows 7 forum, you might be able to guess which OS they are asking about...

Disabling the page file does not cause everything to be loaded into RAM at system boot - where did you get that idea? It just means that there isn't any swap space or virtual memory, so if you try load too much, the system will run out of memory abruptly (with potentially unfortunate results) instead of gradually degrading (as it uses virtual memory).
 

duxducis

Distinguished
Sep 24, 2007
489
0
18,860
ya sorry haven't noticed that i wondered into win 7 forum :)

i newer said anything about disabling paging file. I meant if you could force (and you can, by modifying registry, and i don't want to post how) you can make win 7 load up everything into ram like crazy. Providing little benefit and using hard drive all the time, so if you got 7200rpm HD, it would actually make windows behave slower. And if you got SSD there is no need to preload since its already fast.

There is other good use for spare RAM, on my 32GB memory PC i use RAMdrive and create 25GB virtual drive (mostly for editing 1gb each large Images) also can play whole games off it. With speeds over 3GB/sec it's useful for many things

I used to make 3GB ramdisk when i only had 8 in pc, it worked for my needs as well (video/image editing) when u need huge file to be stored on crazy fast drive.
 
Are you saying that disabling the pagefile didn't improve performance? If that's true, then you weren't using the pagefile significantly enough to matter (not surprising, since if you were then you would probably have run out of memory when you disabled the page file). Creating the pagefile again and putting it into RAM or onto an SSD won't help you any.