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

    • Why Delta Chat is the best decentralized messenger you have probably never tried by Paul Hill There is no shortage of messaging apps out there; we have WhatsApp, Messenger, and Telegram, just to name a few. While Meta has taken steps to incorporate encryption into Messenger and WhatsApp, they still leave a lot to be desired. If you are in the market for a messaging app that promotes security, privacy, and optional anonymity, you'll want to read what I have to say about Delta Chat. For those not familiar with Delta Chat, rather than relying on centralized servers as you do with Facebook Messenger, it relies on email. Essentially, it is a chat interface that feels like a messaging app, but secretly in the background, it is firing off emails. In the past, you used to have to sign in with your email account. When you sent messages to people, it would just be sending encrypted messages to their inbox, which their Delta Chat client would decrypt. When I first learned about Delta Chat, it required users to sign in with an email account, but I was pleasantly surprised upon trying it in 2026 that this is no longer a requirement, or the preferred method was to use the app. Recently, I’ve tried UAD-ng on my old Nokia 3.4 to disable most of the Google apps because the bootloader is locked, and this is the next best option. While finding replacement apps in F-Droid, I came across Delta Chat again, and it has undergone quite a big change since I last used it, with its new chatmail relays, which no longer require you to sign in to your own email account, providing anonymity, and they offer greater security. Android and Desktop Delta Chat apps. Not only does it run on my de-googled phone, but it also works on desktop computers and iOS, making it truly ubiquitous. For me, Delta Chat is a wonderful alternative messenger because it gives you more control. It supports switching between different profiles, which you can set up super quickly; you don’t register a username, you don’t register a password. The only thing you do have is a random string email address on a chatmail relay (which you don’t have to memorize). To maintain access to your profile, you just need to add a second device to your account via QR code or make a backup of your account, which you can restore later. Fail to do these, your account is gone - as it should be if you don’t want to leave accounts that could get hacked later on. My decision to block Google stuff on my Nokia was done for practical reasons; the device sucked when it launched, and it sucks even more now. The nice thing about F-Droid and the apps within is that they’re usually lightweight, free of bloat, and work well on that device. What was inconvenient for me was that it was hard to send messages from that device, say if I wanted to copy a code over to my main phone or send family members a link from that device. That’s when I decided to look at the available chat apps and saw Delta Chat. Another nice thing about Delta Chat is its notifications. Some messaging apps rely on Google’s ecosystem for notification transport on Android; however, with Delta Chat, it can use Google’s solutions if you have Play Services or MicroG installed. Otherwise, it is able to keep a background connection to the chatmail relay server so that you can get notified when you receive a message. As free software, the code of Delta Chat is open for all who want to take it and build upon it. In the future, if the developers of Delta Chat make a catastrophically bad decision and take the app in an undesirable direction, users can take the code and fork the project. This contrasts with closed-source apps from corporations that can take their products in any direction they like. By relying on free software instead of closed-source programs, you actually control your computing. I’ve spoken at length about how running this type of software is like owning your own home rather than renting it. The same applies here; if you use Delta Chat, you don’t need to worry about it going away in the future. Whether it is Telegram, WhatsApp, or Messenger, you are required to register a username and password to use these services. A major flaw in this design is that anyone can try various passwords and potentially break into your account with your complete chat history intact. Sure, there is encryption in Messenger, where you need a second PIN and two-factor authentication in Telegram, but breaches happen all the time. Unlike before, when you used to sign in to your email account to send and receive messages, the primary way to do it now is to create an account on a chatmail relay. The resulting email address is a random string followed by the name of the relay you pick. This means you can start and begin adding contacts Without a username and password, you either need to ensure you have a backup or at least one device running your Delta Chat profile. The primary way to log in on another device is to go to the settings and add a second device. Then, you’ll just scan a QR code with your new device, and it’ll log in to your account and sync all your chat history and contacts. To end users, Delta Chat just looks like any instant messenger; however, it is really sending your messages as encrypted emails to your contact. This is pretty cool from a censorship perspective, as it makes the service more difficult to block. Previously, the main way to use the app was by logging in with email, but nowadays, it’s recommended that you use chatmail relays. Chatmail relays temporarily hold messages in case your device is offline. They are cheap, simple servers that don’t store data as group states. Other information, like your name and avatar, only exists on your device and the devices of those you share your contact information with. The relays are also decentralized and operated by various groups and individuals. It is even possible to set up your own chatmail relay, but most people will want to use one hosted elsewhere. To keep your messages secure, Delta Chat uses a secure subset of the OpenPGP standard that gives you automatic end-to-end encryption. It also uses Secure-Join to exchange encryption setup information through QR-code scanning or invite links. Autocrypt is also used to automatically establish end-to-end encryption between contacts and all members of group chat, but sometime this year Autocrypt v2 will be rolled out, bringing post-quantum resistant encryption and forward secrecy. The Delta Chat FAQ is an interesting read that explains many more details about the app. Credit: Pexels Delta Chat is unique among messaging apps because it is built on email, a technology that’s decades old and isn’t going anywhere soon. What’s more is that email is not centralized either, so it’s far more difficult for any authoritarian regime to disrupt the Delta Chat app. I haven’t spoken too much about features yet, so I will do that now. Delta Chat allows you to do one-on-one chats, group chats, and create channels. It also supports file sharing and making audio and video calls when chatting one-to-one, but it’s not available for group chats right now. At the time of writing, the calling functionality is disabled and can be enabled in Settings > Advanced > Debug Calls. I have used the video calling feature, and the quality is excellent. It works over WebRTC, another open standard. The app also lets you send voice notes, enables disappearing messages, and has its own app ecosystem. I did try playing chess one time there, but it was a bit spotty; though, we did manage to complete the game with a victory for me. To add people to Delta Chat, you can either give them your Delta Chat link or your QR code to scan. These are the only ways to add users, so you won't have any spam bots bothering you. If the people you want to chat with don't have the app yet, just send them your link, and it will take them to a webpage where they can install the app and then add you. It's really quick for them to install it and get started, which is nice. Credit: Microsoft. The Majorana 2 quantum chip unveiled in 2026. I do not think quantum computers are too far out now, and I do hope that Delta Chat is able to push out Autocrypt v2 sooner, rather than later, so bad actors do not attempt to collect encrypted communications and then decrypt them in the future using quantum computers. By getting people’s messages post-quantum-safe now, users won’t have to worry when quantum computers start cracking legacy encryption. Overall, I would recommend this app to people who are already past WhatsApp and Messenger and have perhaps begun using apps like Telegram or Session. It shares a lot of characteristics with these apps and goes a lot further than Telegram in terms of security. By being based on email, it is also resistant to censorship, and the lack of a username and password makes you anonymous (if you want to be) and safe from brute force password cracking attempts. Let me know in the comments if you’ve tried Delta Chat recently. Do you think it's a good bulwark against governments that are tightening their grip on the internet?
    • Putin was behind Farage/Brexit and behind Trump/MAGA. Different idiot lying beasts, same fascist master. Same screwed up results for both nations.
    • For me the Final Fantasy games, Langrisser I & II, Hardspace: Shipbreaker, Horizon Forbidden West Complete Edition, Metaphor: ReFantazio and LUNAR Remastered Collection
  • Recent Achievements

    • One Year In
      bernmeister earned a badge
      One Year In
    • Week One Done
      Scoobystu earned a badge
      Week One Done
    • Week One Done
      tuben earned a badge
      Week One Done
    • First Post
      OffsetAbs earned a badge
      First Post
    • Reacting Well
      OffsetAbs earned a badge
      Reacting Well
  • Popular Contributors

    1. 1
      +primortal
      464
    2. 2
      +Edouard
      217
    3. 3
      PsYcHoKiLLa
      155
    4. 4
      Steven P.
      73
    5. 5
      FloatingFatMan
      71
  • Tell a friend

    Love Neowin? Tell a friend!