Why does Windows use the PF when there's plenty of free RAM?

eLiu

Diamond Member
Jun 4, 2001
6,407
1
0
Why is this? Wouldn't it be faster to just have everything in RAM since I have enough...?

I'm sure windows understands pagefiles better than I do, so I'd like to know what's the reasoning behind this...OR if windows is dumb and I should decrease swap space, I'd like to know that too.

-Eric
 

ShaneDOTM

Member
Jul 25, 2005
44
0
0
reducing the pagefile might increase the processing speed of the software as the RAM is faster, however you could end up slowing yourself down quite a bit when you do anything that is memory intensive. I can't speak for microsoft, but can only assume that there is a reason that they have the page file usage set the way it is.
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
Because it doesn't. You can't use taskmgr to accurately judge memory or pagefile usage, what it labels as "PF Usage" is a large over estimation because it includes things like PF reservations that haven't been written to disk yet.

If you really want to know, buy a copy of "Inside Windows" and read the section of memory management.
 

eLiu

Diamond Member
Jun 4, 2001
6,407
1
0
Originally posted by: Nothinman
Because it doesn't. You can't use taskmgr to accurately judge memory or pagefile usage, what it labels as "PF Usage" is a large over estimation because it includes things like PF reservations that haven't been written to disk yet.

If you really want to know, buy a copy of "Inside Windows" and read the section of memory management.

Ah ok, well that's good to know.

I'll take a look at that next time I'm at B&N.

I'll leave the PF alone then. Though uh would it be faster to put the PF on another drive (not partition, but physical HD)? Slower or faster to put it on another partition of the same drive?
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
If it's not being used it won't make much difference, if it's being used putting it on another physical drive will help as long as that drive isn't being worked hard. For instance, it wouldn't make sense to put it on the same drive as a large video or image that you're working on because everytime the pagefile gets accessed it will move the heads away from your data. And putting it on another partition would make things even worse because you would be increasing the seek times required to get to and from the pagefile.
 

eLiu

Diamond Member
Jun 4, 2001
6,407
1
0
Originally posted by: Nothinman
If it's not being used it won't make much difference, if it's being used putting it on another physical drive will help as long as that drive isn't being worked hard. For instance, it wouldn't make sense to put it on the same drive as a large video or image that you're working on because everytime the pagefile gets accessed it will move the heads away from your data. And putting it on another partition would make things even worse because you would be increasing the seek times required to get to and from the pagefile.

Okay, that makes sense. Thanks Nothinman :)
 

cquark

Golden Member
Apr 4, 2004
1,741
0
0
Originally posted by: eLiu
Why is this? Wouldn't it be faster to just have everything in RAM since I have enough...?

Operating systems page out infrequently used pages to disk to improve performance. The freed memory can be used for the disk buffer cache to more rapidly load new data, instead of being held by old data that no process is currently using. It's also important to keep a certain amount of free memory to rapidly respond to application requests for memory, without having to page out something to disk every time a process does a malloc().
 

madthumbs

Banned
Oct 1, 2000
2,680
0
0
Proof:
Putting your pagefile on Gigabyte's iram (ram drive) won't improve your performance. For that matter, you could make a ram drive if you have sufficient ram and try it yourself.
 

br0adband

Junior Member
Aug 19, 2001
22
0
0
Do this:

Run Task Manager. Click the Processes tab. Click View on the menu bar, then choose Select Columns...

Check off Peak Memory Usage and Virtual Memory Size and then click OK (or add other counters you might be interested in before clicking OK).

Now you can see just how much Virtual Memory (aka pagefile, swapfile, virtual memory subsystem, etc) Windows is asked to create by the programs. You might be surprised to see a program that requires only 10MB of RAM using 80MB of virtual memory - meaning it's chugging down the pagefile like an alcoholic on a binge.

For years people have complained, moaned, groaned, preached, and preached some more about how to best make use of the pagefile and RAM when using Windows. About the only thing that you can do really is:

Just leave it alone. Seriously.

You can tweak, tinker, and toy with it all you want - and sometimes people might actually do some test and get a real result, like say 2% differnence in performance. But really, it's not worth the hassle and worry.

Windows knows what it's doing when it comes to virtual memory and the pagefile. Save yourself (and everyone else) headaches. Install Windows, install your programs, and use them. Stop spending so much time tweaking the OS and spend more time actually using it.

Just my $.02 - but it's $.02 that comes from years of experience tweaking machines to perfection and finally coming to the realization that I missed years of actually using the computers because I spent more time worrying about performance.

How fast is fast? No one knows.

Paul

EDIT:
The only way to seriously affect the performance of virtual memory/paging operations would be to have two drives in a system. If you set a pagefile on the second drive - and this drive can't be on the same controller channel meaning the same IDE cable; SATA doesn't have this problem - you can boost performance considerably.

The OS, if for some reason needing to page out data from RAM to the hard drive, would be able to write to that second drive in the system while reading data from the first drive presumably. The times when this becomes a negative would be if you need to read and write from the second drive at the same time thereby cutting performance almost in half. If you can read from one drive while writing to another at the same time - the optimum configuration - performance skyrockets.

Obviously, the solution would be to have a pagefile (preferably a static one, same size minimum and maximum) on both hard drive - on every drive you have actually. And when I say "every drive" I mean every physical drive, not every partition. Big difference there.

Hope this helps.
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
Now you can see just how much Virtual Memory (aka pagefile, swapfile, virtual memory subsystem, etc) Windows is asked to create by the programs. You might be surprised to see a program that requires only 10MB of RAM using 80MB of virtual memory - meaning it's chugging down the pagefile like an alcoholic on a binge.

Except that Virtual Memory is not the same thing as pagefile usage.

For years people have complained, moaned, groaned, preached, and preached some more about how to best make use of the pagefile and RAM when using Windows

And those people are idiots, you can't use taskmgr to gauge pagefile usage. A lot of the blame belongs to MS though too, for their confusing misuse of Virtual Memory throughout Windows.