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

When programming in C (simple programs), when malloc failed to reserve memory for say a dynamic struct, it would say the program has a error cant continue bla bla bla.......but the program is still running in the background even though that dynamic struct could never be reserved because (in this case) a illegal memory reservation..

Yes, the program will still keep running (unless it was poorly written and crashed), but it's not using more memory than it was before calling malloc.

Let's say the program is using 1MB of memory, and that the system has 512MB free.

The program then calls malloc and tries to allocate 1GB of memory. Since the system only has 512MB free, Windows can't honor this request. It does not allocate any memory, and instead returns an error to the program.

The program will then still only be using 1MB of memory, and the system will still have 512MB free. There is no problem.

Windows will not give it any memory unless the full amount it asks for is actually available. This is in contrast to certain competing operating systems that support overcommitment and will let you allocate memory that isn't necessarily available. This is not possible on Windows. When you allocate memory on Windows, the OS reserves that amount and guarantees that it will be available when you try to access it. Even if the program never uses it, the entire amount is always reserved. This guarantee is absolute.

To prevent this from becoming a performance problem, Windows doesn't actually assign any specific storage (such as pages in physical RAM or in the page file) to the allocation. It only reserves the amount. Imagine that a system has 2GB of free RAM and a 2GB page file. This means that Windows can reserve up to 4GB of memory.

If you then run two programs that allocate 1GB each, they will both succeed, and Windows will reserve 2GB of memory. There is now 2GB left. Let's say neither program tries to actually access the memory, let's say they pre-allocated it for some future use.

We then run a third program that allocates 1.5GB of memory and actually uses it. What Windows will go and do then, is place this 1.5GB in physical RAM. It can do this because even though the first two programs have allocated 2GB, they aren't actually using it. If they later tried to, everything would still be okay, because even though there is only 0.5GB of physical RAM available, there is 2GB of space in the page file. Everyone's happy.

Now imagine if you had disabled the page file so that the only thing available was 2GB of RAM. The first two programs would end up reserving all of this even though they aren't using it. When we then run the third program, it will fail. This is the reason why you generally want to have a page file enabled, although how big an issue this is depends on how much RAM the machine has and the applications and games you run.

Operating systems that allow overcommitment deal with this problem differently. In the example without a page file, the third program wouldn't necessarily fail. Instead, the OS makes assumptions that the first two programs won't be using all the memory they have allocated. It then goes ahead and gives 1.5GB to the third, even though there technically isn't enough memory available if all three programs actually tried to use it. This of course results in a different problem. It now has to go and tell one of the two programs that "oops, the memory you're in the middle of using isn't available after all," or forcefully terminate one of the programs to satisfy the other two.

I'm not going to say anything about which design is better, I'm just pointing out the architectural differences. Maybe you're only familiar with the last example, which again is not how Windows works.

Sorry if this is turning into a complete derail.

Rules for turning the page file on or off.

Turning it off: This displays that the user has no understanding of what the page file is, or what the page files does, and how applications interact with it.

Leaving it on: Either the user doesn't care, doesn't want to be bothered with such things, or has educated themselves on the above lack of understanding the above "Turning it off:" users.

Rules for turning the page file on or off.

Turning it off: This displays that the user has no understanding of what the page file is, or what the page files does, and how applications interact with it.

There is one situation where I will turn the page file off: When I am trying to split a volume and need to condense the space first. The page file is invariably sitting in the middle of the free space on the drive, and Disk Management won't let you shrink the drive beyond where the page file is sitting. You would THINK that Microsoft would have taken this into account and given it a way of moving the page file, but they didn't.

There is one situation where I will turn the page file off: When I am trying to split a volume and need to condense the space first. The page file is invariably sitting in the middle of the free space on the drive, and Disk Management won't let you shrink the drive beyond where the page file is sitting. You would THINK that Microsoft would have taken this into account and given it a way of moving the page file, but they didn't.

I would say that it's such a fringe case that it's not worth having to deal with the hassle of having to redesign the OS to allow page files to be dynamically managed. In order to move it, you would after all have to disable all disk paging, then create a new page file. I suppose a feature could be designed that moved it when you rebooted, but again it's a little too niche.

Anyone know why we even need a pagefile with modern O/S's?

Because RAM is finite.

Yes, the program will still keep running (unless it was poorly written and crashed), but it's not using more memory than it was before calling malloc.

Let's say the program is using 1MB of memory, and that the system has 512MB free.

The program then calls malloc and tries to allocate 1GB of memory. Since the system only has 512MB free, Windows can't honor this request. It does not allocate any memory, and instead returns an error to the program.

The program will then still only be using 1MB of memory, and the system will still have 512MB free. There is no problem.

Analyzing this example:

Process 1 of that program (program A) uses 1MB of memory and requests to allocate a additional 511MB on a 512MB RAM PC. This leaves the OS (this is on a theory level) with 0MB of memory.

What if, while running process 1, we open another process (2) of program A that once again itself uses 1MB of memory? (With pagefile disabled) Process 1 is currently using all 512MB so as soon as we try to open process 2, how can the OS itself deliver a "fail memory" if it has no memory itself to give the message?

Im not trying to be a ******* hdood, just trying to fully understand :) Thank you for your explainations :)

I've always compared ram to a glass of water. Taller the glass the more water it can hold. If the glass gets too full because it isn't big enough, the water will start to overflow over the top into the "Page file" which catch all the excess water the glass can't hold.

Now if you have 6 or 8 gigs of ram then you have a pretty tall glass and the chance of it over flowing are slim. If it ever did over flow and you had the page file turned off, there would be no where for the excess water to go. Now that's just one example and I'm sure the page file is used for more than just spillage. It seems to me that's the big one.

If you only have 256 megs of ram, by the time you boot windows and load 1 or 2 applications the glass is already over flowing into the page file which is 100x slower than ram. Thus the slow down. Get more ram, which gives you a bigger glass, now it can hold more and isn't as likely to over flow as much, thus the computer is faster.

Process 1 of that program (program A) uses 1MB of memory and requests to allocate a additional 511MB on a 512MB RAM PC. This leaves the OS (this is on a theory level) with 0MB of memory.

Well, in that example, the OS would essentially be rendered useless or crash. It's a little too theoretical though. In reality, the OS will do its best to keep enough memory reserved to maintain critical services.

Certain running programs might still go a little wonky as new allocations are denied, but the OS itself will remain responsive enough to let you close programs to reclaim memory.

The biggest problem with your argument is that having a page file does not resolve this problem, it simply delays it. After all, you will run into the exact same situation when you run out of both RAM and page file space. The only actual solution is for the OS to keep some memory reserved at all times for internal use, something Windows does to a very small extent. It only has to be enough to keep the OS from crashing.

I did turn it off for a while, but with only 4GB RAM, and games like Crysis, it was not long until I was experiencing regular crashes, so turned it back on

If I ever get 8GB I might try it again, but I agree, I didnt see any speed increase while it was off

When I had an argument about this a long time ago (with a guy who was a broken record...), I tried getting my system to crash, but it simple did not crash.

If your system crashes, there is something wrong with it.

Steps to the the most easy way to use up all your 4GB+ memory,

1. Make sure you have W7, XP does not do this

2. Connect a USB2.0 HD

3. Check disk for errors (check "Automatically Fix File System Errors" and "Scan for and attempt recovery of bad sectors")

This will make explorer use up all your available memory.

Notice how it doesn't crash, just turns off DWM to free up more RAM...

The PF is just additional slow memory. If you need it, you need more RAM (and maybe a clean-boot and a virus scan)...

/Thread

When I had an argument about this a long time ago (with a guy who was a broken record...), I tried getting my system to crash, but it simple did not crash.

If your system crashes, there is something wrong with it.

Steps to the the most easy way to use up all your 4GB+ memory,

1. Make sure you have W7, XP does not do this

2. Connect a USB2.0 HD

3. Check disk for errors (check "Automatically Fix File System Errors" and "Scan for and attempt recovery of bad sectors")

This will make explorer use up all your available memory.

Notice how it doesn't crash, just turns off DWM to free up more RAM...

The PF is just additional slow memory. If you need it, you need more RAM (and maybe a clean-boot and a virus scan)...

/Thread

34514b5b4b8f83919.gif

and no, that's not a serious clap.

When I had an argument about this a long time ago (with a guy who was a broken record...), I tried getting my system to crash, but it simple did not crash.

If your system crashes, there is something wrong with it.

Steps to the the most easy way to use up all your 4GB+ memory,

1. Make sure you have W7, XP does not do this

2. Connect a USB2.0 HD

3. Check disk for errors (check "Automatically Fix File System Errors" and "Scan for and attempt recovery of bad sectors")

This will make explorer use up all your available memory.

Notice how it doesn't crash, just turns off DWM to free up more RAM...

The PF is just additional slow memory. If you need it, you need more RAM (and maybe a clean-boot and a virus scan)...

/Thread

sick.gif

I've always compared ram to a glass of water. Taller the glass the more water it can hold. If the glass gets too full because it isn't big enough, the water will start to overflow over the top into the "Page file" which catch all the excess water the glass can't hold.

Now if you have 6 or 8 gigs of ram then you have a pretty tall glass and the chance of it over flowing are slim. If it ever did over flow and you had the page file turned off, there would be no where for the excess water to go. Now that's just one example and I'm sure the page file is used for more than just spillage. It seems to me that's the big one.

If you only have 256 megs of ram, by the time you boot windows and load 1 or 2 applications the glass is already over flowing into the page file which is 100x slower than ram. Thus the slow down. Get more ram, which gives you a bigger glass, now it can hold more and isn't as likely to over flow as much, thus the computer is faster.

So having no page file means there is no way to catch excessive water so where does it go? (according to your example)

Well, in that example, the OS would essentially be rendered useless or crash. It's a little too theoretical though. In reality, the OS will do its best to keep enough memory reserved to maintain critical services.

Certain running programs might still go a little wonky as new allocations are denied, but the OS itself will remain responsive enough to let you close programs to reclaim memory.

The biggest problem with your argument is that having a page file does not resolve this problem, it simply delays it. After all, you will run into the exact same situation when you run out of both RAM and page file space. The only actual solution is for the OS to keep some memory reserved at all times for internal use, something Windows does to a very small extent. It only has to be enough to keep the OS from crashing.

OK thank you :)

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

    • No registered users viewing this page.
  • Posts

    • will EU users be getting the extra 1yr update for free again?
    • Samsung announces Galaxy A27 5G with 120Hz AMOLED display, expanded AI features, and more by Fiza Ali Samsung has announced the Galaxy A27 5G, its latest mid-range smartphone, bringing a handful of upgrades over last year's Galaxy A26 5G. While the changes aren't dramatic, they touch several areas that people tend to notice most in day-to-day use, including the display, performance, and software support. One of the more noticeable updates is the screen. The Galaxy A27 5G comes with a 6.7-inch Super AMOLED display that now supports a 120Hz refresh rate, making scrolling and animations appear smoother. Samsung has also switched to an Infinity-O punch-hole camera design, which leaves more room for the display and gives the phone a cleaner look from the front. Under the hood, the Galaxy A27 5G is powered by Qualcomm's Snapdragon 6 Gen 3 processor. The company says the new chip brings improved responsiveness in multitasking, gaming, and media consumption. The company also highlights GPU performance improvements and faster memory technology, which should contribute to smoother graphics rendering, quicker data handling, and improved power efficiency. Furthermore, Samsung has equipped the Galaxy A27 5G with a 12-megapixel selfie camera that is capable of capturing a wider dynamic range and more accurate colours. Like many smartphones launched recently, the Galaxy A27 5G also places a strong focus on AI features. Circle to Search with Google now supports multi-object recognition, making it easier to search for different products or items at the same time. The tech giant says the feature can also support virtual outfit try-ons directly from compatible search results. Photo editing tools are getting some attention as well, with Object Eraser updated to deliver cleaner edits when removing unwanted objects or people from images. Meanwhile, the Voice Recorder app can now transcribe and translate speech simultaneously in one of the 22 supported languages, which could be useful for meetings, lectures, or interviews. Samsung is also expanding AI assistant options on the device, with support for Google Gemini and Perplexity alongside Bixby. The company says these assistants will work more closely with Galaxy apps, including Gallery, to simplify common tasks. Samsung continues to strengthen its long-term software support policy with the Galaxy A27 5G. The smartphone will receive up to six generations of Android OS and One UI updates, along with six years of security patches from its initial global launch. In terms of security, the device includes Samsung Knox and Knox Vault, which are designed to help protect sensitive information stored on the phone. On the flip side, while the company is positioning the Galaxy A27 5G as a step forward from its predecessor, not every change is necessarily an upgrade. One of the first things buyers may notice is the higher price tag. The device launches at $349, making it $50 more expensive than the Galaxy A26 5G's $299 starting price. The selfie camera has also been reduced from 13MP to 12MP, while the ultrawide camera drops from 8MP to 5MP. Samsung has further downgraded the phone's dust and water resistance rating from IP67 to IP64. The Galaxy A27 5G is also marginally thicker at 7.8mm. The Galaxy A27 5G will be available in select markets starting July 3 and will come in four colour options, including Black, Blue, Light Green, and Light Pink. The company will also offer Samsung Care+ coverage plans for customers seeking additional device protection.
    • Doogee and Ulefone regularly release phones with 10k-25k mAh batteries, but those are bricks. I don't understand how they could make it only weigh 220 grams with a battery that size.
    • Windows 10 quietly gets one more year of support and updates by Taras Buria Windows 10 reached its end of life at the end of 2025. Microsoft kicked off the Extended Security Updates program, aimed at giving regular consumers one more year of security-only updates. By doing so, Microsoft gave users more time and money to update their computers to a newer operating system or compatible hardware. Now, with the end of the Extended Security Updates program quickly approaching, Microsoft is making an important adjustment. Users discovered that the official support article for the program now lists a new end-of-support date: The Extended Security Updates program is not a new concept. It has been an official way for business consumers to continue receiving critical updates for unsupported Microsoft products for many years. However, all this time, it was a business-only, paid feature. With Windows 10, Microsoft brought ESU to regular consumers, allowing them to get security updates for Windows 10 past October 2025 essentially for free. When Windows 10 was approaching the end of support, many guessed that Microsoft might adjust its support timelines, and this is exactly what seems to be happening. Of course, Microsoft would love everyone to switch to new computers, such as its latest Surface devices, but in the days of ever-growing hardware prices, not everyone is lucky enough to have money for a new PC. Leaving hundreds of millions of customers with a Windows version that no longer receives security updates is a major risk that Microsoft is not willing to take. If you have a Windows 10 PC to enroll in the Extended Security Updates program, check out this guide to learn how to do so.
    • Sony announces Bungie layoffs that will affect "significant number of employees" by Pulasthi Ariyasinghe Sony today announced that major layoffs are happening at its first-party studio Bungie, the developer that has spawned series like Halo, Destiny, and Marathon over the past decades. The news arrives just weeks after Bungie delivered the final update to Destiny 2, and it's that team being hit with the layoffs the most. CEO of Sony Interactive Entertainment Hermen Hulst revealed the staff reduction today, calling it "painful news." "Over the past several months, together with Bungie leadership, we reviewed the studio’s long-term direction, development priorities, resource needs, and role within our broader portfolio strategy," said Hulst, explaining the decision. "We explored multiple alternatives before concluding that a reduction was necessary to align the studio’s resources with its current priorities and long-term goals." The layoffs will be hitting "a significant number of employees" across most of the Destiny franchise development team. It doesn't look like Sony is planning to continue the series following Destiny 2's sunsetting update. The studio is said to be in early stages of looking at other projects to pivot to, but it's said that keeping the size of the team at current levels is no longer feasible. "We know this decision has a profound impact on the people affected, their families, friends, and teammates," said Bungie leadership in a separate message on social media. "While these changes are necessary to best position the studio now and for the future, that does not lessen the difficulty of this moment or the impact it has on those affected." At the same time, "some" of the Marathon development team are also affected by the layoffs. The recently released multiplayer-only extraction shooter title hasn't seen a big boom of players either, but the company is reportedly hoping that the live service experience will pick up players with future updates.
  • Recent Achievements

    • First Post
      kinowa earned a badge
      First Post
    • Rookie
      krychek57 went up a rank
      Rookie
    • Grand Master
      Jaybonaut went up a rank
      Grand Master
    • One Year In
      Philsl earned a badge
      One Year In
    • Dedicated
      Scoobystu earned a badge
      Dedicated
  • Popular Contributors

    1. 1
      +primortal
      438
    2. 2
      +Edouard
      168
    3. 3
      PsYcHoKiLLa
      133
    4. 4
      Xenon
      77
    5. 5
      Michael Scrip
      75
  • Tell a friend

    Love Neowin? Tell a friend!