Page file question

Status
Not open for further replies.

Spike..

Gawd
Joined
Feb 16, 2006
Messages
666
I built a new system with 16 gb of ram, and i'm trying to think of ways to use it. I was thinking of getting rid of my page file. Its my understanding that if your memory is full it'll dump excess data into the file but with 16 gb of ram that's not really something im worried about. also i have a 90gb crucial ssd and would like to have the extra space. The other option i was thinking of was just moving the page file to a hdd i have on that system, but i don't really want to move it to a slower storage device if its going to use it regardless of the available ram.

Soooo my question is a 2 parter:
firstly does the page file do anything other than take excess data that wont fit into ram?
and secondly is there any disadvantage to getting rid of it all togeather?
 
It takes stale RAM pages and puts them on disk to make room for new data to go into RAM. Considering that you can make a small manual pagefile (say 512 MB or 1 GB), there really isn't any reason to disable it. It doesn't hurt to leave it on the SSD (the best place for it) when you make it a small size, and disabling it can, in some cases, cause older or poorly coded programs to crash. So, the way I see it - no downside to leaving it be (since you can make it small enough not to matter) and potential problems if you disable it completely. So make it small and leave it be.

However, this question always generates tons of discussion both ways.

Here's how to change it (and Microsoft's recommendation not to disable it):
http://windows.microsoft.com/en-US/windows7/Change-the-size-of-virtual-memory
 
Last edited:
thanks for the reply, any idea on how frequently the page file is accessed? and when you say small are we talking a couple gigs?
 
On a normal basis I don't know how often it is accessed, but it is mostly reads. As for size, I would say make it 512MB to 1GB - you can set a minimum and maximum size also, so you could theoretically set it for like 50MB min and 1GB max, but I've never tried it. One of the sysinternal tools can show you what is in the page file and how often it is accessed.
 
Disabled mine years ago, haven't run into any problems (not saying there are none, but they're really rare and in my view most people can ignore the issue.) The problem with Windows storing stale pages in the page file is that Windows can make mistakes while doing this and can not ever predict when you need those pages, so when you do need them the system will slow down. If you're an average enthusiast, with 16GBs I would disable it, and just monitor your ram usage during memory stressing loads to make sure you don't approach your limit. But disabling the page file can also make diagnosing errors problematic as storing kernel dumps (if the system were to BSOD) requires the page file, so with that in mind you could follow the above given advice and make it small, but in my mind it's just as good gone for my usage. I don't use any of those old broken programs, and haven't seen a BSOD in years.
 
I built a new system with 16 gb of ram, and i'm trying to think of ways to use it. I was thinking of getting rid of my page file. Its my understanding that if your memory is full it'll dump excess data into the file but with 16 gb of ram that's not really something im worried about. also i have a 90gb crucial ssd and would like to have the extra space. The other option i was thinking of was just moving the page file to a hdd i have on that system, but i don't really want to move it to a slower storage device if its going to use it regardless of the available ram.

Soooo my question is a 2 parter:
firstly does the page file do anything other than take excess data that wont fit into ram?
and secondly is there any disadvantage to getting rid of it all togeather?
You should never completely disable the pagefile, even with a ton of ram. Why? There is an easy solution you can put in place to cure the 'large footprint' of the pagefile while also maintaining functionality. Just set the min/max for the pagefile to 430MB min, 16384 max. The pagefile will stay at 430 ish MB basically forever, but in the event that you need a larger one it can grow. It will then shrink back down. Min/max developed a bad reputation over the years due to fragmentation that min/max can cause HDD's. Because SSD's do not suffer fragmentation, it now makes it a valid setting.

You can set the performance monitor to watch the pagefile usage and percentage. I have 8GB of ram and the PF almost never gets used above a few percent, though once I had some stuff pushing it to a few hundred MB. Again the min/max is purely to maintain functionality of your OS in every way but at the same time gaining back almost the entire amount of your memory in disk space. The only issue I can think this may cause is if you are low on disk space and suddenly want to write a large chunk to the page file. If your that strapped for room then perhaps a static amount (say 1024MB) is in order so that it's already claimed at all times.

I also would absolutely keep the page file on the SSD. The majority of pagefile reads/writes are very small, which is where the SSD excels.
 
Why would hibernation be bad on an SSD? :? I use hibernation mode . . .
 
i run my pagefile at 2gb on the ssd. hibernation mode is a big waste of ssd space. and since the pc boot fast off the ssd why do you even need it? it saves about 5 seconds.
 
Why would hibernation be bad on an SSD? :? I use hibernation mode . . .
i have 16GB RAM. just imagine what it would do to the flash cells if you write that every day for many months. poor flash cells! i use standby if i must, because we don't get any power cuts. :)
 
You should never completely disable the pagefile, even with a ton of ram. Why? There is an easy solution you can put in place to cure the 'large footprint' of the pagefile while also maintaining functionality. Just set the min/max for the pagefile to 430MB min, 16384 max. The pagefile will stay at 430 ish MB basically forever, but in the event that you need a larger one it can grow. It will then shrink back down. Min/max developed a bad reputation over the years due to fragmentation that min/max can cause HDD's. Because SSD's do not suffer fragmentation, it now makes it a valid setting.

You can set the performance monitor to watch the pagefile usage and percentage. I have 8GB of ram and the PF almost never gets used above a few percent, though once I had some stuff pushing it to a few hundred MB. Again the min/max is purely to maintain functionality of your OS in every way but at the same time gaining back almost the entire amount of your memory in disk space. The only issue I can think this may cause is if you are low on disk space and suddenly want to write a large chunk to the page file. If your that strapped for room then perhaps a static amount (say 1024MB) is in order so that it's already claimed at all times.

I also would absolutely keep the page file on the SSD. The majority of pagefile reads/writes are very small, which is where the SSD excels.

Nice info, I just recently installed my first SSD and set page to fixed 1024mb but I like your idea better. Also if you run process monitor to watch for SSD writes, the default setting is that it places all the data in generates in a capture in virtual memory, a couple of times while using it for hours I had my screen just go blank even though music and everything still worked, reboot and check event viewer and saw out of memory errors. Googled and found out what was going on. Point being, there are things out there that really want to use the page file so I think its best to avoid trouble and just leave it on.
 
I haven't used a page file in years, as well. I find it pointless. It was created when RAM was super-expensive and programming demands outpaced what consumers were willing to pay for RAM, and what was technically possible to stuff into a computer. Only poorly-written applications will have any clue what is going on in virtual memory. IMO Windows shouldn't even allow applications to get that deep into the functioning of the system. IMO all a program should do is request some memory, and Windows tell it if there is enough or not.
 
IWindows shouldn't even allow applications to get that deep into the functioning of the system. IMO all a program should do is request some memory, and Windows tell it if there is enough or not.

It doesn't do that now. Applications cannot reserve memory in the page file. If an application checks if there is a page file, it might be out of fear of running out of memory.
 
An application should not even be allowed to determine if there is a page file or not. It should make its own swap if it is some professional application that may demand a lot of memory.
 
An application should not even be allowed to determine if there is a page file or not. It should make its own swap if it is some professional application that may demand a lot of memory.

You really want an application developer having to assume that the alloc is going to fail, recover from it, and then write their own memory allocations routines to page? Think that through, you'd have a million applications all with perf implications slamming and moving the head all over the place... A fixed pagefile is the best performance way to guarantee both that the operating system can manage the memory, and the performance of the system... I don't understand why you think swapfile's are bad, but applications should control swap themselves?

Also, do you really think an application develop couldn't write the code to query the registry to find where the system pagefile is? It's an NTOpenFile(C:\\pagefile.sys), get a handle and check the error code. (Assuming the pagefile hasn't changed)

A Pagefile is part of every modern operating system. Linux creates a swap partition, (Or at least it used too, they might use a file now, I don't know, haven't used linux in quite awhile.) It abstracts memory allocation away from applications, as well as, allowing the operating system tune the system for performance.

The other thing that people who just assume 16GB is enough memory, (In XP it was 2GB, and turn off pagefile, forget that memory allocations don't just need to have free memory, but continuous memory. A Pagefile can help the system "defrag" the memory to have bigger blocks of continous memory, thereby increasing performance)

I'm firmly in the pagefile camp btw, as well as the leave it alone camp.

This posting is provided "AS IS" with no warranties, and confers no rights.
 
Just turn your pagefile down to 500MB or 1GB. That way apps that REQUIRE a page file won't complain and it won't take up too much space.

If you have the disk space though there's absolutely no reason to mess with the page file size.
 
How laughable. I didn't suggest every application be like this, but rather professional stuff, like 3D Studio Max, which people say bitches if there is no page file. Photoshop can make its own swap. A program that creates its own swap is done only temporarily. I have no gripe with that. What I have a gripe with is people today still defending the use of a page file for the entire system virtual memory, because a few programs out there are programmed so shittily, when we have the capability to run insane amounts of RAM, and a page file was created because of memory needs outpacing hardware development.

Memory doesn't need to be contiguous. A page file doesn't make the system defrag the RAM. It's blazing fast. I really don't care what systems still do. There is no reasonable need a person who goes out and buys 8+ GB of RAM, who isn't using this machine for a professional application, to need a page file.
 
How laughable. I didn't suggest every application be like this, but rather professional stuff, like 3D Studio Max, which people say bitches if there is no page file. Photoshop can make its own swap. A program that creates its own swap is done only temporarily. I have no gripe with that. What I have a gripe with is people today still defending the use of a page file for the entire system virtual memory, because a few programs out there are programmed so shittily, when we have the capability to run insane amounts of RAM, and a page file was created because of memory needs outpacing hardware development.

Memory doesn't need to be contiguous. A page file doesn't make the system defrag the RAM. It's blazing fast. I really don't care what systems still do. There is no reasonable need a person who goes out and buys 8+ GB of RAM, who isn't using this machine for a professional application, to need a page file.

Of course there is. My dad for example. He has 8 gigs of RAM on his machine. He likes to literally have 50 tabs open in Firefox at once. Also he likes to use sleep, never reboots. Between the memory leaks in firefox and all the crapware he's got installed he runs up against the 8 gig commit charge pretty quick. Now he knows to close some tabs when the machine starts getting slow (i.e it's paging). Without a page file he just straight up crashes windows (or worse, windows starts disabling services silently).

Second example, I write software. I need to test long running programs on my desktop sometimes. If I screw up and introduce a memory leak, a (non-fixed size) page file keeps the machine from crashing outright.
 
Actually, only the offending application would crash. It's not the world's fault if a program has a memory leak. A program being programmed by apes and having memory leaks is not a good defense for a page file.

I never said there were ZERO uses for paging, now did I? If you screw up, you fix it. I don't see that as a defense for a page file, either.
 
I never said there were ZERO uses for paging, now did I? If you screw up, you fix it. I don't see that as a defense for a page file, either.

By that line of reasoning who needs virus software, driver signing, or incremental backups? All are just safety nets from screwups.
 
1. I don't really care for virus defense. I don't gallivant around the internet looking at porn sites and clicking on pop-ups.
2. Driver signing...as long as my hardware works how it should, I'm happy.
3. Backups? Not for me. I don't do anything commercial, or have any sensitive data or data that if lost my life or way of earning a living would instantly be over if lost.

A page file isn't a safety net. It was created when software needs outpaced affordable RAM. I don't know how many times I need to repeat that, or how many different ways I can iterate it. Maybe a smart way to manage memory would be the system telling the application that memory is running low, and the program itself saying memory is getting low, and preventing any more from being used, instead of crashing.
 
search the forums and just leave it alone!

and your a fool for not caring about AV, you don't need to visit those site to get infected, you know how many legit sites get infected, it is people like you who spread viruses and malware around heck [H] has been hit a few times alone.
 
I'm just not obsessed with it. I don't need to be obsessed with it because I'm not one of those old farts who downloads any game they see, have 20 browser toolbar addons, etc., etc. Go elsewhere and use your "it's people like you" statements. I'm hardly the problem. Sites get attacked by hackers, not really from infected people visiting them. That's the same kind of bullshit vaccine propaganda saying that unvaccinated children shouldn't be allowed around vaccinated children. There is no logic in that whatsoever. If vaccines are so magical, and are supposed to prevent the disease they vaccinate for, then how the hell would a passer of the disease infect them? A site should employ its own security measures to make sure if there is incoming data, it's not infectious.
 
the logic is you go to a site, get infected, your computer is now a zombie helping spread the infection around to others, mining data from your computer, you may not care, but i am sure your friends care when they get spammed to their email, or other methods.

a site does have to secure it's self, but sometimes someone gets past that security, sure you heard about them, called vulnerabilities... exploits... et cetera....:rolleyes:

its like saying "i dont have to wear a seat belt when i drive, because i am safe driver" yet when you get hit, by someone else you may not live to tell about it.
 
What a joke of logic. If I choose not to wear a seat belt I am not hurting anyone but myself, and still, only theoretically. I refuse to own cars with airbags, too.
 
Actually, only the offending application would crash. It's not the world's fault if a program has a memory leak. A program being programmed by apes and having memory leaks is not a good defense for a page file.

I never said there were ZERO uses for paging, now did I? If you screw up, you fix it. I don't see that as a defense for a page file, either.


Well, I'm glad you appreciate the finer points of software development. Can I ask where you got your degree, since you are such an expert on memory? I'm not being theoritical about how memory subsystems work, I have real world experience on how such systems work...

As to the AV arguments, you do realize many legit sites get infected and start spamming exploit code at your box to infect it? This is not theoritical, it has happened to almost every major site I can think off.


This posting is provided "AS IS" with no warranties, and confers no rights.
 
That's the same kind of bullshit vaccine propaganda saying that unvaccinated children shouldn't be allowed around vaccinated children. There is no logic in that whatsoever. If vaccines are so magical, and are supposed to prevent the disease they vaccinate for, then how the hell would a passer of the disease infect them?

Wow. At first I thought you were just spewing foolishness about page files, but now you've included computer virus/malware propagation to the list, and then topped it with actual infectious disease transmission. Bravo.

Hint: If your unprotected machine becomes infected with malware, it then becomes a source of infection for other machines, as well as a likely source of spam. Then research herd immunity to find out why you are wrong about the vaccines.
 
I've just started reading about this myself. My new rig has 16Gb of RAM and a 120Gb SSD. What I've just done as a test is change the default pagefile size down from 16Gb to just 4Gb.

It seems to me that despite RAM being faster and there being plenty of it, the pagefile is still getting used, due to poor management somewhere along the line. Keeping the pagefile on the SSD keeps the benefit of fast read/writes of the SSD and improves performance of the OS and your apps but lowering the size reclaims some of that wasted space.

I'm just guessing here but the default behaviour of windows which is to create a pagefile the same size as the amount of RAM you have, and set a maximum size as 1.5x the amount is probably to deal with situations where you might need to take 100% of the data out of RAM and fill it with completely new data. Kind of like when you need a bunch of free space in order to defrag a HDD.

Since I don't see 16Gb being filled, much less being filled and another 16Gb needing to be swapped in it's ridiculous that we have a potential max size of 24Gb.

I've set mine to a fixed 4Gb now, I don't see that ever realistically being exceeded, ideally we'd just put everything in RAM with a system which has 16Gb because that it more than enough memory and RAM is significantly faster than even SSDs are, however some legacy apps which are causing pagefile writes deliberately are going to crash without it so it's just safer to have some nominal amount, I would stay away from pagefiles as small as 512-1024mb though, a few gigs is the safest trade off (my opinion only!).
 
Microsoft recommends having the pagefile set to system managed (includes XP).
 
To cover their ass because of stupid programming... If disabling it was an absolute no-no, then there wouldn't be a visible option to do so.
 
To cover their ass because of stupid programming... If disabling it was an absolute no-no, then there wouldn't be a visible option to do so.
Fantastic logic. Why aren't you chairman for all primary Linux operations?
 
even in vista there was a way to "disable it" but it was only to the end user, it was still there.

i would love to see someone do some benchmarks with and without a pagefile.. see if it really matters, or you can just leave it alone, shrink it to a reasonable size...
 
Fantastic logic. Why aren't you chairman for all primary Linux operations?

He should be. Most people that gripe about certain Windows functionality/non-functionality don't realize that some of their issues would be resolved by utilizing another OS and/or compiling everything within that alternate OS as they'd like.
 
I suggest you disable your the L2 cache on your CPU also. After all, L1 cache is faster! :rolleyes:

How many pagefile threads do there have to be? The pagefile is there for a reason. Every reputable site says to leave it there.

Anyone that has taken a computer programming class understands that programs allocate memory even if nothing is using it. This kind of allocated memory is something that, for example, the pagefile can handle. There's a lot more reasons.

The biggest reason is, simply, it doesn't improve performance. There have been several benchmarking tests (I used to point some folks to an extensive test on anandtech during the Pentium 3 era). There's never been a demonstrated improvement in performance more than the standard error, and oftentimes, plenty of cons.
 
Oh, so I guess it's just my imagination that programs allocate more memory as they open more things :rolleyes:

Disabling it, there are no cons for me, and would be none for plenty of people. It's simply not needed for most people with plenty of RAM. I'm sorry you're one of those people who stick with puny amounts of RAM because it doesn't matter because you think swap space on disk is all you need.

Where did I claim it improves performance? Just another sheep who thinks inside a box and resorts to fabrication to try to win an argument.
 
Oh, so I guess it's just my imagination that programs allocate more memory as they open more things :rolleyes:

Disabling it, there are no cons for me, and would be none for plenty of people. It's simply not needed for most people with plenty of RAM. I'm sorry you're one of those people who stick with puny amounts of RAM because it doesn't matter because you think swap space on disk is all you need.

Where did I claim it improves performance? Just another sheep who thinks inside a box and resorts to fabrication to try to win an argument.

What is plenty of ram? Is it 2GB? 4GB? 16GB? 2 TB? The pagefile does more than just be used as swap space. Have you taken one single Operating System or Computer Organization class?

This posting is provided "AS IS" with no warranties, and confers no rights.
 
Status
Not open for further replies.
Back
Top