So...page files.

Locked
VolumetricSteve
Posts: 449
Joined: Sat Nov 06, 2010 2:33 am

So...page files.

Post by VolumetricSteve »

Here it is, 2011, ram is in abundance...at least in my computers. The workstation I'm at right now has 4GB, and out of curiosity, I disabled the page file. To my understanding the whole computer is now running 100% out of the physical ram. I tried to stress this laptop out too, I ran some benchmarks, opened the whole Office Suite and a bunch of 3d party apps all at once and so far I haven't used more than 1.3GB of the 4GB available. My laptop at home has 8GB and my desktop, which I was going to use to run lots of virtual machines, has 16GB. My question is this...

Since Windows 7 64-bit is running perfectly fine on this laptop with 4gb of ram and no virtual memory, what, if any, is the "selling point" of allocating X number of GB to virtual memory?
obsidian
Posts: 10970
Joined: Mon Feb 04, 2002 8:00 am

Re: So...page files.

Post by obsidian »

Meh... I think disabling/enabling the page file is a bit of snake oil. It doesn't hurt to leave it on, it probably won't do anything terrible if you turn it off. Storage space is cheaper than RAM so leaving it enabled doesn't "cost" much.
[size=85][url=http://gtkradiant.com]GtkRadiant[/url] | [url=http://q3map2.robotrenegade.com]Q3Map2[/url] | [url=http://q3map2.robotrenegade.com/docs/shader_manual/]Shader Manual[/url][/size]
^misantropia^
Posts: 4022
Joined: Sat Mar 12, 2005 6:24 pm

Re: So...page files.

Post by ^misantropia^ »

Excessive paging can lead to trashing, where the system is so busy swapping pages in and out of memory that it becomes unusable. Probably not a problem for desktop systems.
User avatar
Foo
Posts: 13840
Joined: Thu Aug 03, 2000 7:00 am
Location: New Zealand

Re: So...page files.

Post by Foo »

A lot of people believe this thing about disabling the page file but it stems from a misunderstanding of its purpose. Yes, it functions on a basic level as a kind of 'RAM overflow'. But it's more than that, and the way Windows handles it (especially in Win7) is much more complex and based on a lot more knowledge that anyone's idea of 'you're forcing it to run from RAM and that's faster amirite'.

Read dis: http://blogs.technet.com/b/markrussinov ... 55406.aspx
VolumetricSteve
Posts: 449
Joined: Sat Nov 06, 2010 2:33 am

Re: So...page files.

Post by VolumetricSteve »

"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)."

That about hit the spot it seems. With 8GB of ram (on this system, and 16GB on another) I'm not sure the key element of keeping my physical memory available via a paging file is going to make a difference in my case, or even in the case of the 4GB workstation I use at work because no combination of programs I use can call enough physical memory to a point where any data needs to be managed by the system with a paging file. It appears that given the scenario that my computer won't ever hit that limit, disabling the page file is one less thing the system has to do.
User avatar
duffman91
Posts: 1278
Joined: Thu Jan 25, 2001 8:00 am

Re: So...page files.

Post by duffman91 »

VolumetricSteve wrote:Here it is, 2011, ram is in abundance...at least in my computers. The workstation I'm at right now has 4GB, and out of curiosity, I disabled the page file. To my understanding the whole computer is now running 100% out of the physical ram. I tried to stress this laptop out too, I ran some benchmarks, opened the whole Office Suite and a bunch of 3d party apps all at once and so far I haven't used more than 1.3GB of the 4GB available. My laptop at home has 8GB and my desktop, which I was going to use to run lots of virtual machines, has 16GB. My question is this...

Since Windows 7 64-bit is running perfectly fine on this laptop with 4gb of ram and no virtual memory, what, if any, is the "selling point" of allocating X number of GB to virtual memory?
I'll give you my educated, professional opinion:

The page file is used for memory management. There are situations where you must address more memory than what is available in RAM. The page file allows for secondary storage to be used (your HDD).

An ideal page file should sit between (1x SystemRam + 1 MB) and 1.5x System Ram. If I recall, the Unix/Linux swap file is recommended at 1.5x System RAM.

Windows needs a page file of at least [1 MB + (size of ram)] in order to perform a system dump (a recorded state of the working memory). The ability to capture and generate system dumps is crucial to troubleshooting issues. (Think BSOD)

If you simply idle on IRC and browse facebook, you could probably do away with a page file. This assumes that you never use the amount of memory installed. However, it's impossible for you to know how a piece of software allocates memory. Tools like Photoshop may allocate page file memory by design. Therefore, it is risky to run an average system with no page file.

The best thing you can do, is set the page file to a fixed value. Do not let Windows grow and shrink the page file as needed (This action involves disk IO which is "expensive" for CPU cycles). Instead, simply allocate a fixed 1.5x RAM size to your page file and call it a day.

On a server, the page file is often fixed at a "reasonable" level depending on application use. If a server has 64 GB of RAM, it's often inconvenient to have a ~100 GB page file taking up HDD space. However, this is a decision that must be taken after completely evaluating and understanding an application's needs.

Hope this helps.
Locked