Allocated Virtual Memory, can I decrease the size or disable it totally?

ithehappy

Senior member
Oct 13, 2013
540
4
81
My C partition's space has becoming very low for past few weeks and I have already done the disk cleanup several times, and now there's nothing more to cleanup really, so the only option I have is to decrease or disable the Allocated virtual memory, now the thing is can I do that? If I do will it hamper system's performance? Right now its set at default 8183 MB, I am on Windows 7 x64.

I have Google searched a bit and some articles on Microsoft's website suggests that I should actually use double virtual memory than my RAM's space, so I have 8 GB RAM meaning I should use 16 GB allocated memory? WTH?

Anyway, when I say about performance I mean gaming performance mainly as this is my primary gaming rig.

Thanks in advance.

PS: I don't use Hibernation, I don't need System Restore and all those features. I simply wanted to know whether decreasing that space of 8183 MB to half or something like that will affect any performance or not.
 
Last edited:

Emulex

Diamond Member
Jan 28, 2001
9,759
1
71
You should leave virtual memory to automatic settings..

powercfg -h off

(disable suspend hiberfil.sys)

run disk cleanup as administrator and delete old service packs/prior updates

remove system restore points.

Spend $70 and get a 256gb ssd upgrade!
 

Teva

Junior Member
Mar 5, 2015
2
0
66
You are going to get a lot of different responses, most completely wrong.

You only need swap if you use more memory than you have actual RAM (or have a stupid application that actually checks for the existence of a swap file). Don't believe the hype that people spew about moving infrequently used applications from RAM to swap to make room for file cache - You are better served having the application be fully in RAM than parts of it on spinning rust/ssd.

The old adage about having 2x swap than ram was only valid when pc's had 16-512MB of ram. There are servers out there with 1TB of ram, think of how slow and unresponsive those enterprise applications would be if they got swapped out to disk.

Just make sure you have enough ram, if you run out windows will actively terminate applications to get ram back. I'd recommend 16gb of ram if you are going to totally disable swap. You can do it with 8gb but you have to be conscious about what you run. If you do it with 8gb have task manager active for a week or so and monitor your memory usage. You will occasionally get caught having an application just die because of the lack of ram, usually from an internet browser with multiple tabs open.

Just try it, you won't hurt anything, you can always turn it back on later. Windows will kill applications long before it is in danger of crashing your system or corrupting the filesystem.

Enough with the ram talk, you should really free up some disk space. If you play video games check your c:\users\username\my games folder for save games, for example skyrim save can be quite large. delete the old ones or right click on the folder and compress it. You probably also need to delete some downloaded files in c:\users\username\downloads. There can also be a lot of junk in c:\users\username\appdata, specifically temp files spattered about that disk cleanup doesn't catch. If you are truly down to ~10GB of disk space, you need to go on a deletion spree or buy a new HD.

Some anecdotal first hand gaming experience with 16gb of ram: I play games like skyrim and fallout - heavily modded without issue (as in ~120 mods - mostly high/4k texture mods, Skyrim uses 5.7gb of ram when running), have chrome open with 20+ tabs without issue. The only game that every complained was, i think, Titan Quest - and in that case i made a 256K swap file and it ran without issue.
PC: Asus P5Q, Q9650 @3.8ghz, 16GB ram, 128GB SSD, 4GB GTX 770, Acer 120hz LCD
 

Emulex

Diamond Member
Jan 28, 2001
9,759
1
71
Certain apps (photoshop?) will use paging file and fail to run without one! It is not a SWAPFILE per se but a paging file, which the o/s uses all of the time!

You can add another drive and move your paging file to the new drive if that would help! But if the drive goes away, windows will be in a bad place when it tries to start up!

Best advice: install windirstat and run it to see what is hogging all your disk space:

https://windirstat.info/
 
Last edited:

ithehappy

Senior member
Oct 13, 2013
540
4
81
Thanks, but adding SSD, formatting OS, or moving the OS to a bigger partition, well those options are not in my to-do list, I simply don't have the time to do all that!
 

ithehappy

Senior member
Oct 13, 2013
540
4
81
then run windirstat and clean up your drive!

Okay, never heard about that, will try it later when I get time.

But I ran that command as you said, and now C drive's space has increased a lot! It was less than 6 GB free, now it's slightly over 11 GB free! What that does command do? I mean what's disable suspend hiberfil.sys?
 

Emulex

Diamond Member
Jan 28, 2001
9,759
1
71
disable hibernation mode, which many folks don't use on Desktop's! We leave our pc's on 24x7 with active power management it doesn't cost that much more.

I bet there are ton of folks who forget about the hiberfil.sys !
 

ithehappy

Senior member
Oct 13, 2013
540
4
81
Okay thanks. Honestly that hibernation thingy never made any sense to me, especially while standard sleep mode is available!
 

nicolachel

Junior Member
Mar 17, 2015
4
0
0
Feel free to disable it.

The worst thing that can happen is that you actually run out of memory and the kernel/driver is not happy and you crash which is not a major issue for a gaming rig if it happens once or twice I believe.

Once that actually happens, you simply set vm to a bigger number or plug in more sticks until they are happy

I remember back in xp days it always maintains some swap space regardless of setting (commit charge total is bigger than physical size), not anymore with newer NTs, they just crash a driver or itself.
 

BFG10K

Lifer
Aug 14, 2000
22,709
2,979
126
If you're unsure, use the min/max values. You can periodically monitor it to see if the swap file's size has increased.

I have mine set to min 16MB / max 1GB and I've never seen it increase over the minimum 16MB value.
 

Berryracer

Platinum Member
Oct 4, 2006
2,779
1
81
You should leave virtual memory to automatic settings..

powercfg -h off

(disable suspend hiberfil.sys)

run disk cleanup as administrator and delete old service packs/prior updates

remove system restore points.

Spend $70 and get a 256gb ssd upgrade!

Ditto, took the words out of my mouth. Get a bigger SSD, they're so cheap now and disbale hibernation file and leave the page file alone. I have had nothing but trouble when touching the page file. Want an example, just try running a few songs in Windows Media Player with no page file and see what happens.
 

Dufus

Senior member
Sep 20, 2010
675
119
101
First of all the pagefile.sys is for modifiable data. Paging can still happen for non-modifiable data such as executable files that are read / execute. Instead of paging to the pagefile.sys it pages to the disk where the program resides.

RAM is translated to virtual memory addresses using page tables. The amount of addressing available is more or less the amount of addressable RAM plus the size of the pagefile.sys. It can be seen using the task manager under commit.

When you use graphics VRAM some of this commit is used, up to twice the amount of VRAM used. So if you want to be able to use all your RAM then IMO you should use a pagefile size up to twice the VRAM usage. For instance using 3GB of VRAM may use up to 6GB of commit. Using 8GB of DRAM without a pagefile.sys would leave just 5GB to 2GB of addressable RAM and if resources are low may result in some of your non-modifiable executables being evicted from RAM until active resulting in slow downs or low memory warnings / crashes.

What size the pagefile.sys needs to be will be very dependent on your own usage and something you will have to work out for yourself. You perhaps should try BFG10K's suggestion at least.
 

Stuka87

Diamond Member
Dec 10, 2010
6,240
2,559
136
Okay thanks. Honestly that hibernation thingy never made any sense to me, especially while standard sleep mode is available!

Hibernation is extremely useful for laptops. The sleep mode in Windows is horrible compared to on a Mac. My laptop will drain its battery overnight in "sleep mode" (Dell Precision). Hibernating uses no power at all. My Mac laptops on the other hand can go weeks in Sleep mode.

Performance will degrade if you completely disable the swap file, unless you have like a 4200rpm drive or something. Anybody who says it is only used if you do not have enough memory needs to retake their MSE class.
 

corkyg

Elite Member | Peripherals
Super Moderator
Mar 4, 2000
27,370
239
106
Again, it depends on how the laptop is used. Mine is generally OFF unless I am on travel or am giving it a weekly update. With a SSD boot drive, a cold boot is very fast, so hibernation serves no purpose for me, nor does sleep. As for the page file, I have always given it a separate, small partition and fixed its size. It never causes a problem.
 

ithehappy

Senior member
Oct 13, 2013
540
4
81
Yeah thanks. This question was meant for my desktop only, so what's the purpose of it on laptops is not really relevant.

And thanks for the suggestions on SSD once again, this topic was created from an urgent need, if I had the time then I would probably use a 1 TB partition for the Windows installation purpose only!
 

Elixer

Lifer
May 7, 2002
10,376
762
126
You are going to get a lot of different responses, most completely wrong.
Yes... seems that way.
You only need swap if you use more memory than you have actual RAM (or have a stupid application that actually checks for the existence of a swap file). ...snip
That is wrong, there is no logical reason to disable page/swap file.
It is there for a reason, and some programs *require* it, as Emulex said.

Again, just let windows handle it, leave it on automatic, or make it a fixed sized (set both min/max to the same value).
 

Diogenes2

Platinum Member
Jul 26, 2001
2,151
0
0
Certain apps (photoshop?) will use paging file and fail to run without one! It is not a SWAPFILE per se but a paging file, which the o/s uses all of the time!

You can add another drive and move your paging file to the new drive if that would help! But if the drive goes away, windows will be in a bad place when it tries to start up!

...

Not so.. Windows will create the page file on the C drive if the alternate designated drive is not available..
 
sale-70-410-exam    | Exam-200-125-pdf    | we-sale-70-410-exam    | hot-sale-70-410-exam    | Latest-exam-700-603-Dumps    | Dumps-98-363-exams-date    | Certs-200-125-date    | Dumps-300-075-exams-date    | hot-sale-book-C8010-726-book    | Hot-Sale-200-310-Exam    | Exam-Description-200-310-dumps?    | hot-sale-book-200-125-book    | Latest-Updated-300-209-Exam    | Dumps-210-260-exams-date    | Download-200-125-Exam-PDF    | Exam-Description-300-101-dumps    | Certs-300-101-date    | Hot-Sale-300-075-Exam    | Latest-exam-200-125-Dumps    | Exam-Description-200-125-dumps    | Latest-Updated-300-075-Exam    | hot-sale-book-210-260-book    | Dumps-200-901-exams-date    | Certs-200-901-date    | Latest-exam-1Z0-062-Dumps    | Hot-Sale-1Z0-062-Exam    | Certs-CSSLP-date    | 100%-Pass-70-383-Exams    | Latest-JN0-360-real-exam-questions    | 100%-Pass-4A0-100-Real-Exam-Questions    | Dumps-300-135-exams-date    | Passed-200-105-Tech-Exams    | Latest-Updated-200-310-Exam    | Download-300-070-Exam-PDF    | Hot-Sale-JN0-360-Exam    | 100%-Pass-JN0-360-Exams    | 100%-Pass-JN0-360-Real-Exam-Questions    | Dumps-JN0-360-exams-date    | Exam-Description-1Z0-876-dumps    | Latest-exam-1Z0-876-Dumps    | Dumps-HPE0-Y53-exams-date    | 2017-Latest-HPE0-Y53-Exam    | 100%-Pass-HPE0-Y53-Real-Exam-Questions    | Pass-4A0-100-Exam    | Latest-4A0-100-Questions    | Dumps-98-365-exams-date    | 2017-Latest-98-365-Exam    | 100%-Pass-VCS-254-Exams    | 2017-Latest-VCS-273-Exam    | Dumps-200-355-exams-date    | 2017-Latest-300-320-Exam    | Pass-300-101-Exam    | 100%-Pass-300-115-Exams    |
http://www.portvapes.co.uk/    | http://www.portvapes.co.uk/    |