Memory - page file question

Macgruber

Senior member
Dec 17, 2005
295
0
0
just got another dual channel set of 2x4gb Crucial Vengeance PC15000 ram

:0 should i set the paging file to 24492-24492 as recommended in virtual memory? or should i do 24000-24000
i know some people say remove it, some say store it on another drive

i just want best to function with the ssd im running on ;0 space is somewhat of an issue but if my ram will run all the programs fine i want it to do so
 
Last edited by a moderator:

corkyg

Elite Member | Peripherals
Super Moderator
Mar 4, 2000
27,370
240
106
Make the paging file a fixed size - min/min. You won't hardly ever use it. Enjoy the Grand Canyon.
 

Vectronic

Senior member
Jan 9, 2013
489
0
0
Test it... I don't suggest disabling the PageFile entirely, especially with Windows 8, it will try re-creating it.

Set it to a really small amount, 128, 256, 512MB at a fixed size. Odds are you won't need/use it at all, but if you do, then increase it to a larger size as necessary.
 

Macgruber

Senior member
Dec 17, 2005
295
0
0
Test it... I don't suggest disabling the PageFile entirely, especially with Windows 8, it will try re-creating it.

Set it to a really small amount, 128, 256, 512MB at a fixed size. Odds are you won't need/use it at all, but if you do, then increase it to a larger size as necessary.

so should i get rid of the 24gb and just set it to 12gb or like 1.5 x 1024 xD ?

is it just better to have that page file of my RAM x 1.5 or can any of you help me understand :(
 
Last edited by a moderator:

Macgruber

Senior member
Dec 17, 2005
295
0
0
Just set your page file to like 1 GB.

im gonna just drop it from 24 to 12288, i really dont want to run risk of stuff crashing hard and me losing data :(

i literally max out my ram at times so im scared to have it set so low :S

edit- actually im going to put about 1024x1.5 and try what you said and see if i run good
ok i lied, im going to do 2048x2 because im scared since i eat so much ram i dont want crashdumps xD~
 
Last edited by a moderator:

zuffy

Senior member
Feb 28, 2000
684
0
71
I have the HTPC and laptop set to 512MB while my main PC with 32GB has pagingfile disabled. No problem with video encoding, Photoshop and general usage in either configuration.
 

tracerbullet

Golden Member
Feb 22, 2001
1,661
19
81
im gonna just drop it from 24 to 12288

Question for ya - Why bother asking this, have a bunch of knowledgeable people tell you what to do, and then totally ignore their advice?

Also, on a more serious note, what do you do that eats up so much RAM? Most people can't use even 8GB.
 

Vectronic

Senior member
Jan 9, 2013
489
0
0
The whole RAM * 1.5 stuff is long gone, almost everyone (and if not I'm sorry for you) has 4GB or more now... the whole x1.5 thing was back around 2002 and before, when you generally had <1GB of memory.

If you are maxing out your RAM, then when you do so, fire up Task Manager/Resource Monitor/Performance Monitor, look at how much PageFile it's using.

There's no real risk to having your pagefile set too small, if Windows needs a bigger one, it will either A: ask, or B: just make it bigger itself (depending on config).

Set it to 4GB's if you want, just so you can go "ooh, 20GB's of memory"... I did that for awhile, 8GB+2GB Page "yay 10GB"... then reduced it to 512, then 256.... RAM * 0.03125... there.
 

VirtualLarry

No Lifer
Aug 25, 2001
56,587
10,225
126
A pagefile of 1x to 2x RAM size is optimal for performance. Making the pagefile too small, will save space on a smaller SSD, but will also hamper your performance.
 

Anteaus

Platinum Member
Oct 28, 2010
2,448
4
81
A pagefile of 1x to 2x RAM size is optimal for performance. Making the pagefile too small, will save space on a smaller SSD, but will also hamper your performance.

That rule doesn't generally hold true any more. Windows in particular handles memory differently today than it did back then. While I don't recommend completely getting rid of a swap file for compatibility reasons, there is no performance difference between a system with 8GB ram with a swap file of any size and a system with 8GB ram and no swap file. Memory is cached into a pool for everything to use.

Naturally it is a bit different with systems that are memory starved. Swap files still play an important roll there.

If you have some sources that say otherwise I'll take a look, but the whole swap versus no swap thing has been investigated widely for a few years now and in virtually every case there was no difference in performance with systems with greater than 4GB ram. Basically the choice became whether to keep a swap file for legacy reasons or to just not use one.

Myself, I've been running with no swap for a year now with zero issues.
 

Macgruber

Senior member
Dec 17, 2005
295
0
0
Question for ya - Why bother asking this, have a bunch of knowledgeable people tell you what to do, and then totally ignore their advice?

Also, on a more serious note, what do you do that eats up so much RAM? Most people can't use even 8GB.

"Most people can't use even 8GB"

so i cant ask a question and take the information people give me to apply it to my own?
not to be rude but
question for ya- why even give advice if you expect me to do everything you say :p

im not ignoring your advice, its just what you do on your computer isnt what i do on mine and your settings wont help mine -_- if i missed the part where any "knowledgeable" people explained WHY they set their page file let me know so i can re-read it because im sure people just posted their own settings.
 
Last edited by a moderator:

Vectronic

Senior member
Jan 9, 2013
489
0
0
Initially, I set my Pagefile to a non-boot HD (something I've always done, highly suggested if you actually need a Pagefile), in a 1:1 ratio (8+8GB).

In addition to that, I also wanted to make sure it was off the boot drive, because my boot drive was now an SSD.

Then I reduced the size to 2GB when I realized it wasn't really being used, and for the "10GB!" factor which made memory calculations easier...lol

Then, I wanted to A: get rid of the partition that the Pagefile was on, and B: noticed that the contents of the Pagefile were always the same, about 130MB... so I just said "screw you" and disabled it.

After that, I noticed Windows 8 would often re-create the Pagefile on the boot partition... after a few lazy attempts at preventing it from doing this, I just gave up and decided to limit it's size... first 512, then 256, so it's got roughly twice the space it desires for whatever it's tossing in there, but basically doesn't exist.

I don't know what it was, or when it changed, but now Windows doesn't use any Pagefile at all... the only time it's used the Pagefile is when I was intentionally maxing out RAM... Stress Tests, Rendering, or just tossing images into Photoshop until it won't allow any more.

The reason for reducing or disabling the Pagefile:
1. To use as much of, or only your physical RAM.
2. Storage space requirements.

The Reasons for enabling Pagefile:
1. Some applications insist on using it.
2. You don't have enough memory installed.

Fire up Performace Logs & Alerts, or Performance Monitor (depending on on which version of Windows)

Locate "Page File" object, and add the "Usage" and "Usage Peak" counters.
Locate "Memory" object, and add either or all of: "Pages/sec", "Page inputs/sec", "Page outputs/sec".

See how much of the page file it's using, leave Performance Monitor open for a day, see what "Usage Peak" ends up as, set your PageFile size to that + 50%.

If it's zero, then 0 * 1.5 = 0.
 

VirtualLarry

No Lifer
Aug 25, 2001
56,587
10,225
126
That rule doesn't generally hold true any more. Windows in particular handles memory differently today than it did back then. While I don't recommend completely getting rid of a swap file for compatibility reasons, there is no performance difference between a system with 8GB ram with a swap file of any size and a system with 8GB ram and no swap file. Memory is cached into a pool for everything to use.
You're wrong. The "memory hierarchy" is not dead, not by any means. A pagefile allows the less-often used memory pages to be flushed out to the backing store, to allow the faster RAM pages to be used to accelerate more commonly-used memory accesses.

All you are doing by disabling the paging file, is forcing "stale" memory pages to reside in RAM, where they are doing no good, when those RAM pages could be used, for example, for disk caching.

Edit: I will say that disabling the pagefile, does put an upper-bound on worst-case application latency and responsiveness, even if overall runtime for processes is increased. You're losing overall performance, for a benefit of never having to briefly wait for anything to get paged in.

Edit: For a similar example, let's say you have a 60GB SSD, and a 1TB HDD. Would you waste space putting infrequently-watched movie files on your SSD? When you could just put them on the HDD and use the space on the SSD for things that will actually be accelerated by it, like programs?
 
Last edited:

Anteaus

Platinum Member
Oct 28, 2010
2,448
4
81
You're wrong. The "memory hierarchy" is not dead, not by any means. A pagefile allows the less-often used memory pages to be flushed out to the backing store, to allow the faster RAM pages to be used to accelerate more commonly-used memory accesses.

All you are doing by disabling the paging file, is forcing "stale" memory pages to reside in RAM, where they are doing no good, when those RAM pages could be used, for example, for disk caching.

I do agree with your reasoning, but the premise is about performance. Even if "stale" memory pages, as you call them, reside in ram, there is no performance reduction unless you don't have enough ram to contain them as well as perform all other required functions. The situation only becomes dire when the system has to triage applications due to insufficient memory.

As I said, if you can find some sources that back up your statements I'll take a look, but my own experience contridicts your statement. My SSDs have certainly not displayed any reduction in performance due to lack of a swap file, and based on what you said about disk caching that should not be the case. I think with every system there is a ram threshhold that is crossed where swap files become unnecessry. Obviously that threshhold will vary depending on use. If you're browsing the internet and playing the occasionally 32-bit game, that might be 6GB. If you're doing heavy CGI and other memory intensive actions maybe its 8, 12, or 16 GB.

In any event, the OP asked about 16GB. There are very few things that could be done on that machine that would get near half of that, and even if the OS stored all of its "less-often" used memory in ram, the system would still be faster than if it had to access the page file to get it because ram is certainly faster than any SSD or HDD.

I guess we all just have to do what works for us. To the OP, all I would say is try it different ways and go with what works for you and not based on what any of us tell you.
 

VirtualLarry

No Lifer
Aug 25, 2001
56,587
10,225
126
I do agree with your reasoning, but the premise is about performance. Even if "stale" memory pages, as you call them, reside in ram, there is no performance reduction unless you don't have enough ram to contain them as well as perform all other required functions. The situation only becomes dire when the system has to triage applications due to insufficient memory.
You are forgetting about opportunistic optimizations, namely, disk caching. If the system is dealing with a large file on-disk, and manipulating it, then it could page relatively unused application memory pages out to the pagefile, in order to free up memory pages for use for disk caching to optimize the disk I/O.

balancing ram usage between application memory, and disk caching, is a fairly tricky balancing act.

However, all caches have limits on how much they optimize performance, hit rates versus size, etc. If you add enough RAM, far beyond what your application memory usage will be, and enough for a decent-sized disk cache, then I admit, a pagefile may not be able to accelerate your performance much more.
 

Vectronic

Senior member
Jan 9, 2013
489
0
0
Thread title is "Just upgraded to 16GB RAM", in a file server that may not be enough, in a day-to-day desktop gaming system... you're doing something wrong if Windows needs to swap out pages for I/O reasons.

The main problem with the Pagefile recently, ie: somewhere between 2004 and 2010 lets say... is that most users had enough RAM for what they used their computers for, but, Windows would still swap pages out after a certain amount of idle time, which means unecessary disk I/O, and delays while the pages are loaded into physical memory again.

Windows 7, and Windows 8 have made improvements to this, however Windows 8 still does this. You can have 16GB's of physical memory, only be using 1.5GB's of it... wait an hour, it will swap out to the pagefile for effectively no reason at all, and it's degrading performance since even if the pages in the pagefile are never used again, Windows still needs to clear them out at some point, that's unnecessary disk I/O twice (write to pagefile, clear pagefile)... for no benefit.

99% of the time, with my measly 8GB's of RAM, if all I had was an PATA drive, I would see performance benefits of disabling the pagefile. Because the I/O speed of reading from the Pagefile would be huge compared to the amount of time/cycles it takes to determine there isn't enough addressable memory to allocate the requested amount. We're still talking like a 1/20th of a second most of the time, but if you minimized a game, let it sit idle, and Windows swapped out say, all the texture data... you're going to notice that -pause- when you maximize the window again and it has to load it back into memory again.

Ideally, there should be no difference to anything whether or not the pagefile is enabled or not. Currently, for typical home usage, there is.

I keep mine small, so Windows can theoretically swap out things it may have needed during boot or something but won't touch again... but it isn't large enough to page out something that would really bottleneck when it needed to be loaded back into physical memory.
 
Last edited:

Macgruber

Senior member
Dec 17, 2005
295
0
0
so i went looking for pagefile.sys today and its gone ^^

theres a pagefile set, just no file :(
 
Last edited by a moderator:

KingFatty

Diamond Member
Dec 29, 2010
3,034
1
81
If the system is dealing with a large file on-disk, and manipulating it, then it could page relatively unused application memory pages out to the pagefile, in order to free up memory pages for use for disk caching to optimize the disk I/O.

But doesn't windows use a different system to handle that kind of thing?

Describing the computer as how "it could" do XYZ sounds pretty speculative on your part.

However, the nice thing here is we don't have to speculate or guess at what the system may or may not do.

Everyone can simply observe their memory usage. If your memory usage *never* exceeds the available RAM, you don't need a huge pagefile. Just press CTRL+Shift+ESC and see.

Also, you can set the pagefile to an arbitrarily small setting, like 1 GB. Then enable the option to allow windows to grow the pagefile if necessary.

Boom, issue is resolved, everyone is happy. But you'll see, that pagefile will *never* change because windows will have no reason to make it bigger, because you'll never use all 16 GB of ram.
 

GammaLaser

Member
May 31, 2011
173
0
0
But doesn't windows use a different system to handle that kind of thing?

Describing the computer as how &quot;it could&quot; do XYZ sounds pretty speculative on your part.

However, the nice thing here is we don't have to speculate or guess at what the system may or may not do.

Everyone can simply observe their memory usage. If your memory usage *never* exceeds the available RAM, you don't need a huge pagefile. Just press CTRL+Shift+ESC and see.

Also, you can set the pagefile to an arbitrarily small setting, like 1 GB. Then enable the option to allow windows to grow the pagefile if necessary.

Boom, issue is resolved, everyone is happy. But you'll see, that pagefile will *never* change because windows will have no reason to make it bigger, because you'll never use all 16 GB of ram.
See: http://blogs.technet.com/b/markrussinovich/archive/2008/11/17/3155406.aspx
Some feel having no paging file results in better performance, but in general, having a paging file means Windows can write pages on the modified list (which represent pages that aren’t being accessed actively but have not been saved to disk) out to the paging file, thus making that memory available for more useful purposes (processes or file cache). So while there may be some workloads that perform better with no paging file, in general having one will mean more usable memory being available to the system (never mind that Windows won’t be able to write kernel crash dumps without a paging file sized large enough to hold them).
Admittedly, the measurable impact of the page file size after your physical memory size exceeds the peak working set size is probably extremely small.
 

Macgruber

Senior member
Dec 17, 2005
295
0
0
so how about that pagefile.sys that ran away? :p anyone know where to find that bastard?

Hes not in my task manager resource monitor, C drive or anywhere i look
 
Last edited by a moderator:

Throckmorton

Lifer
Aug 23, 2007
16,829
3
0
Why do "they" recommend that the paging file be 1.5x as big as the RAM? That's counterintuitive... and now we have people wasting 24gb of hard drive space on a paging file.