Would you agree with Me putting a 2gig swap file on my C drive?

Page 2 - Seeking answers? Join the AnandTech community: where nearly half-a-million members share solutions and discuss the latest tech.

Tostada

Golden Member
Oct 9, 1999
1,789
0
0
Originally posted by: Nothinman
In short, a Windows system does not benefit from having a locked page file size. A larger "minimum" size will indeed help systems with little physical memory by reducing resizing of the page file by the OS. A large "maximum" will incur no performance penalty.

This seems to be a common theme in statements on either side of the issue. You can prove that there isn't much benefit from a fixed pagefile ... but you can't prove that there is a benefit from a non-fixed pagefile. If you have enough RAM, I doubt it really matters either way.

I think having a fixed-size non-fragmented pagefile could be somewhat useful, though. For example, I have 2GB RAM and a 2GB fixed pagefile. The file might as well be all in one placee. Even though you get a minimal benefit from the pagefile being non-fragmented, it is still a fact that other files have to fill in the space around the pagefile. A fragmented pagefile forces other files to fragment. For the anal-retentive type, it seems like unnecessary messiness.

I had 1GB of RAM on my system and a 1GB fixed pagefile for over a year, and this never caused me any problems. This leads me to believe that the pagefile was a sufficient size and that with 2GB of RAM that a 2GB pagefile should be more than sufficient. If the 2GB pagefile is sufficient, it might as well be fixed, because:

1) The hard drive space it takes up is a non-issue. If Windows starts the pagefile off at 1GB, I'm not getting any real benefit out of the free hard drive space. I've got plenty. To the contrary, starting off with a smaller pagefile is NEVER going to help you, because if your hard drive is near capacity then the swapfile won't be able to expand when it needs to (which is going to be at least as serious a problem as if you had a fixed pagefile that wasn't big enough).

2) If Windows does decide to start the pagefile off small then make it larger, resizing the pagefile will degrade performance. Sure, it's minimal, but what's the point?

3) If I actually run into some kind of problem having 2GB RAM and a 2GB pagefile, it would actually be useful to me to know what I was doing when all that memory got gobbled up. At that point, I may prefer to set a fixed 4GB pagefile or I may very well let Windows manage the swapfile size, but that would also probably be a good time to buy more RAM.

All of those reasons are pretty minimal in swaying someone one way or the other, though. I think maybe the people who want to set their own swapfile size have some inner hatred for Microsoft and just want to assert their authority over the operating system. :)

I would, of course, be interested in knowing if anybody thinks I'm totally off-base here.
 

Tostada

Golden Member
Oct 9, 1999
1,789
0
0
I guess the way I see it, if you have enough RAM, the pagefile shouldn't be used that much, so you're really just reserving space for the pagefile. If you think you might use a 16GB swapfile, you might as well set a fixed 16GB swapfile as soon as you install Windows, so that way it'll be on the fastest part of the drive.

Of course, Windows can't be perfect in its use of the swapfile, so there have to be issues that could argue for smaller, larger, or system-managed swalfile sizes.
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
but you can't prove that there is a benefit from a non-fixed pagefile. If you have enough RAM, I doubt it really matters either way.

The benefit is that when you need the space the OS will be able to grow the pagefile and your app won't crash and you won't waste a ton of space on a large pagefile when you don't need the space.

I think having a fixed-size non-fragmented pagefile could be somewhat useful, though. For example, I have 2GB RAM and a 2GB fixed pagefile. The file might as well be all in one placee. Even though you get a minimal benefit from the pagefile being non-fragmented, it is still a fact that other files have to fill in the space around the pagefile. A fragmented pagefile forces other files to fragment. For the anal-retentive type, it seems like unnecessary messiness.

If you're spending time worrying about the physical layout of your files, you have too much free time =)

I have some extremely fragmented volumes and I don't notice any performance delays and you won't likely either unless you're doing things that need really low or real-time latency like live A/V stuff.

2) If Windows does decide to start the pagefile off small then make it larger, resizing the pagefile will degrade performance. Sure, it's minimal, but what's the point?

Using the pagefile enough that it needs to be expanded will degrade performance, at that point the extra time required to expand the pagefile won't be noticed.

3) If I actually run into some kind of problem having 2GB RAM and a 2GB pagefile, it would actually be useful to me to know what I was doing when all that memory got gobbled up. At that point, I may prefer to set a fixed 4GB pagefile or I may very well let Windows manage the swapfile size, but that would also probably be a good time to buy more RAM.

In either case you would know what the culprit was, either you would run taskmgr and once it finally loaded see what's eating all of the memory or the app would crash. Either way it would be obvious where the problem lies =)

I just think all of the time people spend thinking about how to tweak this crap is funny because you end up spending more time on this crap than you're saving by using the 'tweaks'.
 

Tostada

Golden Member
Oct 9, 1999
1,789
0
0
Originally posted by: Nothinman
The benefit is that when you need the space the OS will be able to grow the pagefile and your app won't crash and you won't waste a ton of space on a large pagefile when you don't need the space.

That doesn't make any sense. If Windows needs to grow the pagefile, then you didn't really have free space. You need to leave space available in case Windows needs to grow the pagefile. If you do not have enough extra space for Windows to grow the pagefile, you get no benefit from letting Windows manage it. If you do have extra free space, you should've just allocated that to the pagefile to begin with, so that way Windows doesn't need to resize the pagefile when you actually use it.

In the end, you must come to the conclusion that there is a reasonable size for your pagefile. Let's pretend this size is 4G. If you let Windows manage the swapfile, it will allocate less than 4G, but you must agree that it would not be a good idea for you to fill your hard drive to the point that the swapfile couldn't be expanded to 4G if you think there is a possability that it would need the space. Therefore, you must leave the space free, and you are getting no benefit by letting Windows manage the size of the pagefile.

Personally, I've used a fixed 1G pagefile for a year and have used Photoshop a lot, Office a lot, played a lot of games, run PostGreSQL constantly, kept 10 poker tables running 24 hours a day... The swapfile was not inadequate, so I find it hard to believe that I should let Windows manage it just in case it needs to grow bigger. This is especially true now that I've upgrade to 2G of RAM and a 2G swapfile.

Originally posted by: Nothinman
If you're spending time worrying about the physical layout of your files, you have too much free time =)

Obviously you're joking, but that's a ridiculous thing to say. If you're going to argue about how to setup your swapfile, you simply can't say, "You should let Windows manage it because it's a waste of time to worry about the physical layout of your files." Say something relevant.

Originally posted by: Nothinman
Using the pagefile enough that it needs to be expanded will degrade performance, at that point the extra time required to expand the pagefile won't be noticed.

Again, that's totally ridiculous. You're saying it doesn't matter just because the slowdown is too little to be noticed. This is NOT a valid argument for letting Windows manage the swalfile.

Originally posted by: Nothinman
In either case you would know what the culprit was, either you would run taskmgr and once it finally loaded see what's eating all of the memory or the app would crash. Either way it would be obvious where the problem lies =)

Once again, you're saying it doesn't matter one way or the other. You have said nothing back up your position that it's better to let Windows manage the swapfile.
 

BFG10K

Lifer
Aug 14, 2000
22,709
3,002
126
I agree with Nothinman on this one. Too many people are obsessed with "tweaking" the Windows pagefile scheme when in reality it works much better if you just leave it alone.
 

smack Down

Diamond Member
Sep 10, 2005
4,507
0
0
Using the pagefile enough that it needs to be expanded will degrade performance, at that point the extra time required to expand the pagefile won't be noticed.

That isn't true at all. The time it takes to swap out pages is one the order of millseconds but it can take windows a second or two to expand the page file. Additionally sending unused pages to the page file will have very little effect on preformance if your not using the HD. It really depends on the usage pattern. For example if you have 30 programs opened and idle setting in swap using the swap has zero effect on prefomance.
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
That doesn't make any sense. If Windows needs to grow the pagefile, then you didn't really have free space. You need to leave space available in case Windows needs to grow the pagefile. If you do not have enough extra space for Windows to grow the pagefile, you get no benefit from letting Windows manage it. If you do have extra free space, you should've just allocated that to the pagefile to begin with, so that way Windows doesn't need to resize the pagefile when you actually use it.

No, that's like saying you shouldn't install any more programs because you might want to fill that drive with MP3s later on. Your safety net is only as big as your drive and nothing can change that. And it's irrelevent past 4G anyway because IIRC that's the limit for a single pagefile.

Obviously you're joking, but that's a ridiculous thing to say. If you're going to argue about how to setup your swapfile, you simply can't say, "You should let Windows manage it because it's a waste of time to worry about the physical layout of your files." Say something relevant.

I can and do say that, I would be willing to bet that the kernel developers working for MS know just a little bit more about their own VM system than you do and as such, letting it be system managed will work just fine. Especially in your case since you have 2G of memory and should rarely touch the pagefile.

Again, that's totally ridiculous. You're saying it doesn't matter just because the slowdown is too little to be noticed. This is NOT a valid argument for letting Windows manage the swalfile.

It is a valid argument, once you're in the middle of a paging storm a few hundred I/Os to enlarge the pagefile will look like a drop in the ocean. If the time you spend worrying about your pagefile setup and analyzing your filesystem's fragmentation is greater than the time you've saved by keeping it all neat and tidy, what's the point?

Once again, you're saying it doesn't matter one way or the other. You have said nothing back up your position that it's better to let Windows manage the swapfile.

The burden of proof is on you not me, I'm saying use the defaults because they work just fine and you gain nothing by changing them. You're the one advocating altering the settings with no proof that it's actually worth anything.

That isn't true at all. The time it takes to swap out pages is one the order of millseconds but it can take windows a second or two to expand the page file.

And you've measured this how?

Additionally sending unused pages to the page file will have very little effect on preformance if your not using the HD

Which is why you shouldn't worry about it, just let Windows do it's thing.

It really depends on the usage pattern. For example if you have 30 programs opened and idle setting in swap using the swap has zero effect on prefomance.

You can't really make that kind of blanket judgement though. If MFC42.dll gets paged out for some reason it'll only save a few megs of memory because it's one library, but just about any operation in any app will take a performance hit the next time you try to use it because most Win32 programs make use of MFC.
 

Tostada

Golden Member
Oct 9, 1999
1,789
0
0
Originally posted by: Nothinman
No, that's like saying you shouldn't install any more programs because you might want to fill that drive with MP3s later on. Your safety net is only as big as your drive and nothing can change that. And it's irrelevent past 4G anyway because IIRC that's the limit for a single pagefile.

Huh? You're arguing that one benefit of a Windows managed pagefile is extra free hard drive space, but you can't use all that space since you need to leave room for the swapfile to expand. The obvious question is: If you're letting Windows manage your pagefile, how full will you let your hard drive get? Will you let it get down to 5G free? 2G? 1G? Then you probably should've just made your pagefile that big to begin with. Why not?

I don't think there's a 4GB limit on the pagefile. I just tried setting mine to 150GB and Windows didn't complain.


Originally posted by: Nothinman
I can and do say that, I would be willing to bet that the kernel developers working for MS know just a little bit more about their own VM system than you do and as such, letting it be system managed will work just fine. Especially in your case since you have 2G of memory and should rarely touch the pagefile.

Wow. Where do I begin... That's some pretty childish circular reasoning. If we could trust Windows to always function optimally on the default settings, this thread would never have been started.


Originally posted by: Nothinman
It is a valid argument, once you're in the middle of a paging storm a few hundred I/Os to enlarge the pagefile will look like a drop in the ocean. If the time you spend worrying about your pagefile setup and analyzing your filesystem's fragmentation is greater than the time you've saved by keeping it all neat and tidy, what's the point?

You're serious? You're actually trying to defend a Windows managed pagefile on the grounds that it's not enough slower to matter? At least the time Windows spends resizing the swapfile is something tangible. This "time spent worrying" argument is hilarious. Your time's that valuable? And what are you doing with your afternoon? You're making multi-page posts on a web forum.


Originally posted by: Nothinman
The burden of proof is on you not me, I'm saying use the defaults because they work just fine and you gain nothing by changing them.

But you've already admitted that you gain something from a fixed pagefile. You just don't think you gain enough to be worth the time spent thinking about it, I guess.


Originally posted by: Nothinman
Which is why you shouldn't worry about it, just let Windows do it's thing.

This is not a reasonable statement in the company of a bunch of geeks on a tech forum. I don't think anybody's that worried about it. We just want to know more about the best way to setup the pagefile.
 

ninjazed

Senior member
Nov 29, 2000
278
0
76
I put my paging file on the RAID 0 array per a tech recommendation for better performance. The OS is on a separate drive. I can't honestly tell if it boosted performance but it didn't hurt anything either. :confused:
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
Huh? You're arguing that one benefit of a Windows managed pagefile is extra free hard drive space, but you can't use all that space since you need to leave room for the swapfile to expand. The obvious question is: If you're letting Windows manage your pagefile, how full will you let your hard drive get? Will you let it get down to 5G free? 2G? 1G? Then you probably should've just made your pagefile that big to begin with. Why not?

There are too many other things that can go wrong before you ever see an instance where your pagefile can't grow because you're out of disk space. It's one of those things that isn't worth worrying about even though there's a remote chance of it happening.

I don't think there's a 4GB limit on the pagefile. I just tried setting mine to 150GB and Windows didn't complain.

http://support.microsoft.com/?kbid=237740

The article says it applies to Win2K and I found a similar one for NT4, so maybe they fixed in XP. I imagine it wouldn't apply to Win64 either, but can't say for sure.

Wow. Where do I begin... That's some pretty childish circular reasoning. If we could trust Windows to always function optimally on the default settings, this thread would never have been started.

Of course it would exist, there's always people who are never happy with what they have. The problem is that most of them don't understand how VM is really meant to work so they try dumb things like putting their pagefile on a ramdisk.

You're serious? You're actually trying to defend a Windows managed pagefile on the grounds that it's not enough slower to matter? At least the time Windows spends resizing the swapfile is something tangible. This "time spent worrying" argument is hilarious. Your time's that valuable? And what are you doing with your afternoon? You're making multi-page posts on a web forum.

Trying to educate people is more worthwhile than timing how long it takes Windows to expand the pagefile =) And most of these posts only take like 5 minutes.

But you've already admitted that you gain something from a fixed pagefile. You just don't think you gain enough to be worth the time spent thinking about it, I guess.

It's not what I think, it's the truth in 99% of the cases.

This is not a reasonable statement in the company of a bunch of geeks on a tech forum. I don't think anybody's that worried about it. We just want to know more about the best way to setup the pagefile.

Sure it is, spend your time on something that will actually give you some tangible results. Learn to program, install Linux, shop for some more memory or a faster hard disk. Hell buy a copy of Inside Windows and read the memory manamagent chapters, that'll give you more information on VM and your pagefile than changing numbers in a text box ever will.
 

Tostada

Golden Member
Oct 9, 1999
1,789
0
0
Originally posted by: Nothinman
There are too many other things that can go wrong before you ever see an instance where your pagefile can't grow because you're out of disk space. It's one of those things that isn't worth worrying about even though there's a remote chance of it happening.

Then I must ask again, what arbitrary amount of space are you going to leave free on your hard drive for these "many other things" that could go wrong, and why wouldn't you just set a reasonably large fixed pagefile to begin with?

I just got a nice 250GB WD SATAII drive with a 16MB cache and the price came out to $0.42 per GB. You're a little too overzealous with your argument about saving a little hard drive space with a Windows managed swapfile.


Originally posted by: Nothinman
Of course it would exist, there's always people who are never happy with what they have. The problem is that most of them don't understand how VM is really meant to work so they try dumb things like putting their pagefile on a ramdisk.

I guess this gets to the heart of things. People like to fiddle around. People like to optimize things for even the most ridiculously small gains. Your argument is essentially, "It doesn't matter much, so why bother?" which is certainly valid to some degree, but not in the context of a group of people trying to find out what's best regardless.


Originally posted by: Nothinman
Trying to educate people is more worthwhile than timing how long it takes Windows to expand the pagefile =) And most of these posts only take like 5 minutes.

It's not educational to throw your arms up in the air and say it doesn't matter enough to bother with something.

The bottom line is that it's not a big hassle by any stretch of the imagination to go to the Virtual Memory options and set a fixed pagefile, so if it gives you some benefit (and you haven't said anything to refute that it does give some benefit), why not?

Of course, if you're going to have a generic statement to give people on the subject, it would be best to tell them to let Windows manage it, but if you have plenty RAM and planty hard drive space, it looks like you should probably set a fixed pagefile.
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
Then I must ask again, what arbitrary amount of space are you going to leave free on your hard drive for these "many other things" that could go wrong, and why wouldn't you just set a reasonably large fixed pagefile to begin with?

I just got a nice 250GB WD SATAII drive with a 16MB cache and the price came out to $0.42 per GB. You're a little too overzealous with your argument about saving a little hard drive space with a Windows managed swapfile.

I'm not intentionally setting aside free space for anything, although filling your drive completely is a bad idea for many reasons not related to the pagefile. The disk space you lose by setting it large and fixed is purely wasted in 99% of the cases, so yes it's nice to get a little bit back by leaving it system managed but I don't really care about the disk space savings, I'm saying it's not worth changing the setting.

I guess this gets to the heart of things. People like to fiddle around. People like to optimize things for even the most ridiculously small gains. Your argument is essentially, "It doesn't matter much, so why bother?" which is certainly valid to some degree, but not in the context of a group of people trying to find out what's best regardless.

But it does matter because changing those settings teach you absolutely nothing (infact they feed you incorrect information since MS mislabels them) and the performance is extremely difficult to gauge. So it's essentially impossible to figure out what the best setting is, most of the affect is pure placebo from seeing the big yellow bar be contiguous in the defragger and thinking to yourself "And it won't fragment my drive". If you really want to learn that's great, but get a copy of Inside Windows and actually learn how the thing works instead of plugging in numbers and pretending it's making a difference.

It's not educational to throw your arms up in the air and say it doesn't matter enough to bother with something.

I haven't thrown my arms up, I've been trying to point out why it's not worth messing with.

The bottom line is that it's not a big hassle by any stretch of the imagination to go to the Virtual Memory options and set a fixed pagefile, so if it gives you some benefit (and you haven't said anything to refute that it does give some benefit), why not?

You haven't proven that it does give you any benefits.

Of course, if you're going to have a generic statement to give people on the subject, it would be best to tell them to let Windows manage it, but if you have plenty RAM and planty hard drive space, it looks like you should probably set a fixed pagefile.

You should leave it system managed no matter how much memory you have, there's no proof that a fixed pagefile helps in any way. Putting it on a seperate physical drive can be helpful if you have a large data set that you access, that way pagefile access won't interfere with the data set. But otherwise you're not gaining anything by making the pagefile contiguous.