Do you play games with pagefile on or off?


  

125 members have voted

  1. 1. Do you play games with pagefile on or off?



Recommended Posts

I know some games/programs don't run well with pagefile off, but the ones that don't I just turn off my pagefile because the game loads faster and it's much more smoother (Ex: Starcraft 2). Just curious if you guys do this also

And I also use a hardware profile to keep all the services off when gaming :) . Forgot to mention, I have no problems at all on Starcraft 2 with the pagefile off

TL;DR version: Let Windows handle your memory/pagefile settings. The people at MS have spent a lot more hours thinking about these issues than most of us sysadmins.

Many people seem to assume that Windows pushes data into the pagefile on demand. EG: something wants a lot of memory, and there is not enough RAM to fill the need, so Windows begins madly writing data from RAM to disk at this last minute, so that it can free up RAM for the new demands.

This is incorrect. There's more going on under the hood. Generally speaking, Windows maintains a backing store, meaning that it wants to see everything that's in memory also on the disk somewhere. Now, when something comes along and demands a lot of memory, Windows can clear RAM very quickly, because that data is already on disk, ready to be paged back into RAM if it is called for. So it can be said that much of what's in pagefile is also in RAM; the data was preemptively placed in pagefile to speed up new memory allocation demands.

Describing the specific mechanisms involved would take many pages (see chapter 7 of Windows Internals, and note that a new edition will soon be available), but there are a few nice things to note. First, much of what's in RAM is intrinsically already on the disk - program code fetched from an executable file or a DLL for example. So this doesn't need to be written to the pagefile; Windows can simply keep track of where the bits were originally fetched from. Second, Windows keeps track of which data in RAM is most frequently used, and so clears from RAM that data which has gone longest without being accessed.

Removing pagefile entirely can cause more disk thrashing. Imagine a simple scenario where some app launches and demands 80% of existing RAM. This would force current executable code out of RAM - possibly even OS code. Now every time those other apps - or the OS itself (!!) need access to that data, the OS must page them in from backing store on disk, leading to much thrashing. Because without pagefile to serve as backing store for transient data, the only things that can be paged are executables and DLLs which had inherent backing stores to start with.

There are of course many resource/utilization scenarios. It is not impossible that you have one of the scenarios under which there would be no adverse effects from removing pagefile, but these are the minority. In most cases, removing or reducing pagefile will lead to reduced performance under peak-resource-utilization scenarios.

http://serverfault.com/questions/23621/any-benefit-or-detriment-from-removing-a-pagefile-on-an-8gb-ram-machine

The paging file is needed in some scenerios, as Fred Derf's post points out.

Why not create a ram drive and point your pagefile to it? As long as you have enough memory, this would guarantee the best of both worlds.

You'd be improving the performance of the pagefile but hurting the performance of your memory, and cutting the amount of memory available making the pagefile needed more often.

That sounds silly.

Why not create a ram drive and point your pagefile to it? As long as you have enough memory, this would guarantee the best of both worlds.

This is the worst idea in history. All you will be doing is making less memory available and hurting performance. It does nothing to improve anything. You might as well turn the page file off in that scenario. Doing so would be preferable, as Windows doesn't actually need it for anything (apart from saving crash dumps, which are optional anyway). It's only a safety net. It's technically possible for an application to allocate memory in the page file directly and so these would fail unless they were programmed with a fallback, but I know of no applications or games that do this.

He doesn't state his configuration, so I'm going to assume it's a modern Windows 7 setup. Windows actually does not go and randomly page all the time. If you aren't low on memory, it does not page to disk. Can the OP actually provide data from the resource/performance monitor to illustrate the problem he's having?

Windows will still swap memory to disk even with the pagefile disabled. It'll secretly use temporary files instead. Don't discount the placebo effect for the personal anecdotal evidence that you may hear about a performance boost.

It isn't uncommon for half of the test subjects on fake medication (i.e. sugar pills) to identify that the "medication" have improved their condition. That's the placebo effect in action. There's this whole mind over matter thing going on when you believe that something will work.

When it comes to pagefiles, however, the experts (the ones that actually understand Windows' memory management) will tell you to keep it on while the amateur hobbyists will tell you to disable it for a performance boost. It's your choice though.

Windows will still swap memory to disk even with the pagefile disabled. It'll secretly use temporary files instead.

There is no such thing as a secret page file. This is a myth that I think originated from the task manager in older versions of Windows, which incorrectly labeled certain graphs "page file usage" when that is not what they were. If you disable all page files, it really disables them.

The rest is right, which is why I suggest that he actually measures it.

Turning the pagefile off for more performance is one of the bad ideas which will never die out, similar to the TCP/IP patch some people keep suggesting for better download speeds since XP SP2.

Just to provide an authoritative source for my last claim. From the 5th edition of Windows Internals, page 781:

qxjo11.png

If you look at the source of the memory manager, you can find various optimizations for when there's no page file. Just to show that Windows is designed with this in mind.

n507f7.png

Messing with the page file is pointless.

+1

Any proven performance gains from turning it off?

Its not if there is any proven performance or not, its that (nowadays) it is pointless

There is no such thing as a secret page file. This is a myth that I think originated from the task manager in older versions of Windows, which incorrectly labeled certain graphs "page file usage" when that is not what they were. If you disable all page files, it really disables them.

The rest is right, which is why I suggest that he actually measures it.

Well here is my question then:

If you open a program that uses 1GB of RAM and you have 512MB of RAM and your page file is disabled, what happens?

Turning off the pagefile is a bad idea for sure, but wouldn't manually setting both the min and max value to the same amount prevent the pagefile from getting fragmented?

Well here is my question then:

If you open a program that uses 1GB of RAM and you have 512MB of RAM and your page file is disabled, what happens?

Windows will complain that it is low on memory and ask you to close one of more applications.

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • The Trump administration doesn't want you to use OpenAI's GPT-5.6 without its approval by David Uzondu Image via @realDonalTrump (X) As OpenAI prepares the release of its next model, GPT 5.6, the White House has instructed the company to limit the distribution of the software to a small group of government-approved partners instead of the general public, as it has done with previous releases. According to The Information, OpenAI Chief Executive Officer Sam Altman sent an internal memo to staff on Thursday explaining that the federal government will approve access "customer by customer" during an initial preview phase. Altman noted in the communication that this restrictive rollout is "not [their] long-term model" for software deployment, and the company plans to work toward a "more sustainable" distribution method later. CNN said that both OpenAI and the Trump administration view the capabilities of GPT 5.6 on the same level as Anthropic's Mythos and that government officials intend to "collaborate with frontier AI labs to develop shared approaches for addressing the challenges of scaling this technology." The latest restriction comes just weeks after the US Commerce Department decided to restrict Fable, a version of Mythos with extra safety "guardrails" to prevent users from exploiting software vulnerabilities. Not long after the release, though, researchers at Amazon found a way to bypass these restrictions, prompting an aggressive response from federal authorities. The government ordered Anthropic to cut off access for non-US citizens located outside the US, non-US citizens living inside the US, and incredibly, even Anthropic's own foreign-born employees. Anthropic now appears to be building a workaround to resolve this compliance block with an update to its Privacy Policy that introduces a category called "Verification Data" to handle KYC and Digital IDs. This setup could mandate digital identity checks to filter users by nationality, requiring a government-issued ID and facial biometric data. Who knows? Maybe in the future, you would have to scan your US Passport or State ID to prove your citizenship before you are allowed to chat with Fable 5 (or any other model).
    • When Windows 7 was released I created an AutoHotkey script that uses Alt+` as a keyboard shortcut to move a window across monitors. I have been using that script for over 15 years and this is the first time I have come across another app that uses the same shortcut!
    • I called it last year that they wouldn't end support when they said there would. There are too many people still on Windows 10 waiting for something better to upgrade to and 11 ain't it! The recent promises of fixing Windows 11's many problems is nice, but unless they deliver on those promises in a big way then I expect customers will still want to stick with 10.
    • Full ACK. I went too far adressing your post specifically. And as you said, it up to us customers as participant of the market dynamic as it happens to decide whether we spend our money on a product or not. The responsibility is to the company. In case of this price hike one could assume that MS is expecting or even starting to see a new interest in XBox hardware so they want to avoid losses per unit sold. I find it fair enough that they granted a period in which everyone interested could grab a unit for the current price (Amazon.de has a reliable stock of XBox Series X digital, which I bought last December after having sold my day one Series X a year ago). It is not that they cash up their customers starting on Monday. Cheers and let's cling to our perfectly fine hardware as long as we deem it worthy in relation to purchasing something new!
  • Recent Achievements

    • Week One Done
      xvvxcvv earned a badge
      Week One Done
    • One Month Later
      xvvxcvv earned a badge
      One Month Later
    • Enthusiast
      Xonos went up a rank
      Enthusiast
    • Conversation Starter
      Admir earned a badge
      Conversation Starter
    • First Post
      The_Focal_Point earned a badge
      First Post
  • Popular Contributors

    1. 1
      +primortal
      414
    2. 2
      +Edouard
      169
    3. 3
      PsYcHoKiLLa
      129
    4. 4
      neufuse
      69
    5. 5
      Xenon
      67
  • Tell a friend

    Love Neowin? Tell a friend!