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

    • Yup, that's a doozy right there 😄
    • It's a bundle of tools created by a variety of people, so things can go wrong sometimes. It's a great addition to Windows, and I use a lot of the tools on a daily basis. Also, it's still a 0.**** release so quick updates are to be expected 😉
    • Oh, I did. And it's even worse than I was hoping! Besides a lot of techno-babble jargon (yes I understand 100% of it but it's still all just techno-babble) there's 2 key points that make me super-weary about even considering testing this out. -- By default, after installation, a relay is automatically set up, so you do not need to care about that. * Non-chatmail apps use email servers as a long-term message archive while chatmail clients use email servers for ephemeral instant message relay. * Supporting the full variety of classic email setups would require considerable development and maintenance efforts, and complicate making chatmail-based messaging more resilient, reliable and fast. -- Basically, the end-user device is the 'server' (relay) so there is NO ARCHIVING whatsoever because every message is necessarily ephemeral. Great for techno-paranoia (and for illicit activities preferring no tracks to cover) but terrible for everybody else. It's also ironically contradictory to engineering principles of redundancies besides the transport layers due to the explicit absence of any persistent storage. Instead of 'classic email address' retaining multi-GB messaging archives on its server, now every device must retain 100% of those storage demands. (Email messages were originally meant to be short correspondences, not the multi-MB attachments boondoggle that now exists with unlimited spam engines flooding every potential recipient.) Any device swap or reset (or loss) makes the entire message history go bye-bye forever... lest there's an off-device auto-archival "relay" mechanism that's really a separate server that holds onto all transported messages (an email server) that utilizes 'chatmail email address' identities (like an email server) and its own persistent storage archive (like an email server). But... this solution is hoping to exist alongside real-world email address identities (based on the email server relay pathway) but simply render messages in chat thread format in an ephemeral manner (with contents being encrypted, and messages auto-expiring) ... In the end, it's a chat app/experience for the Web3/P2P-at-all-costs zealots. (I have accts on all sorts of federated web3 services so I understand the technical and non-technical alike.) For any practical users, however, it's just another service to download/install, register, cross-share id cards/qr codes, but know that there's no history/archive whatsoever (by design) so no account/message recovery whatsoever... update the device, install a bummed update patch, or dare upgrade your device... all history, poof, gone. Ya gotta start everything over again like they're a brand new person.
    • You've tried DuckDuckGo and Brave Search, now get serious with SearXNG by Paul Hill Over the last decade, it has become quite trendy to dump Google Search in favor of privacy-preserving alternatives such as DuckDuckGo, Startpage, and Brave Search. These search engines have done a very good job at highlighting dodgy practices by Google, such as adjusting search results based on what it thinks you’ll like (filter bubble) and stalking you around the web to advertise to you. While these search engines are good starting points when compared to non-private services like Google, there are still quite a few issues with them. For example, both DuckDuckGo and Brave Search require running non-free JavaScript in your web browser, which is comparable to running proprietary software on your computer, meaning you can be sure about what it’s actually doing in the background. Another issue is that these search engines are hosted on the respective companies’ servers, and you are using a service that you don’t control. Finally, DuckDuckGo, while offering privacy features, relies heavily on Microsoft’s infrastructure for its results and, in the past, has permitted Microsoft tracking scripts. If you are looking for a more private search solution than DuckDuckGo, Brave Search, and Startpage, then I recommend taking a look at SearXNG. It is a privacy-respecting metasearch engine that can be used via different public instances, which is useful for mobile users, or you can install it on your computer or server and run it locally with maximum control. Unlike Google, Bing, or Brave Search, which crawl the web and have their own search indexes, SearXNG is a metasearch engine, meaning it taps other search engines, stripping your identifying data, such as IP address, user agent, and cookies, in the process. Your search query is sent to the other search engines you enable before aggregating the results. SearXNG has deployment flexibility. If you are a casual user or a mobile user and don’t want to run SearXNG locally, you can use a public instance that is hosted by someone else. The main problem with this is that you are putting trust in the maintainer of the instance regarding stuff like logs that they may keep; good hosts should have a privacy policy explaining their policies. If you are trying to use SearXNG, you can also install the software on your device and then head to 127.0.0.1:8080 in your browser and search from there. While you don’t have to worry about a third-party admin like the public instances, search engines could ultimately block your IP address if they frown on you pulling in their search results locally. If you want to run it locally, it’s a good idea to use proxies or VPNs to hide your actual IP. You don’t have to worry about this with a public instance, as search engines never see your IP address. The main privacy benefit of using SearXNG is that it isolates your identity from the underlying engines that it’s capable of searching, such as Google and Bing. These search engines will only see requests coming from a generic server, so they can’t profile you and create a bubble filter that influences what results you see. This also ensures that your search engine doesn’t turn into an echo chamber that prevents you from reading alternative points of view. As a free software project, you are allowed to inspect SearXNG to make sure there are no negative features bundled inside. This sets it apart from the privacy search engines mentioned earlier because you can’t check their source code. As a meta search engine, you are not restricted to getting results from one source. Due to the fact that it scrapes content from other websites, your SearXNG instance will periodically get blocked from different providers, so it’s good to select a range of sources as a backup. While enabling all of the services will give you great results, this can make searching slower. I am personally happy with slower searches for the best results, but you can always check which providers are slowing down your search from the search results page and disable them to speed things up. If you want decent results quickly, enable the main search providers such as Google, Brave, DuckDuckGo, Qwant, Bing, and Yahoo. This way, you get wide coverage without the latency. On the Engines tab in Preferences, do note that there are different tabs, such as General, Images, and Videos, with their own providers that can be toggled and are not covered by "Enable all" while on the General tab, so be sure to dig into each. Just a note, if you want to enable everything, press "Enable all" in one tab, then hit save at the bottom of the page, then do the next tab, and so on. If you press "Enable all", then do that in each tab, and then save, nothing will stick. When I had just some of the search engines enabled, I searched “define nefarious” and results came back with the definition of “define” - obviously that was a sucky result. However, when I had everything enabled, it found dictionary pages for the word “nefarious” and even had an inline definition on the sidebar, which is quite nice too - that was delivered by WolframAlpha for anyone wondering! Probably the worst thing about this meta search engine is that the engines you select are saved with a cookie, so you must enable them on every new device you use SearXNG on, including if you decide to go into incognito mode with your web browser. Honestly, I would say this is the most annoying aspect, and perhaps if your browser lets you choose a separate private browsing search engine, then it would be best to use DuckDuckGo for this portion of your browsing. Another weakness of SearXNG is the random blocking of it by search providers. When you are on the results page, expand the “Response time” box, and it will show things like “Suspended: too many requests” or “access denied”. This is why it is good to enable several providers so that there is always a fallback to get results from. I won’t pretend SearXNG will be for everyone, however, if you enable all of the providers and put up with the slower response time, the results can be really amazing. Even if you don’t want to use it as your daily driver, keeping a bookmark handy that links to it is a good idea if you ever feel like doing a deep dive into a niche topic where other search engines are just failing to bring up any good result, due to the amount of sources it looks on. If you’re interested in radical user control over the software you use, installing SearXNG locally can also be a good idea, but be prepared to be temporarily blocked from sites if you trigger bot sensors without a VPN. Personally, I’ve opted to use a public instance, rather than install it myself. If you want to use it via a public instance, head over to searx.space to find a provider. Let us know in the comments if you have used SearXNG or its predecessor, Searx. What do you think about the quality of the results?
    • Dear Neowin, If it is not too much trouble, can you start using the new-ish designations for Insider Preview? "Experimental" is different than "former Dev" as it can apply to different models, eg 26H1 or 26H2 etc, right? No need to seed confusion IMHO. And, please "finally" update your graphics. OK?
  • Recent Achievements

    • Week One Done
      flexorcist earned a badge
      Week One Done
    • One Month Later
      Woland13 earned a badge
      One Month Later
    • Week One Done
      Woland13 earned a badge
      Week One Done
    • One Year In
      bernmeister earned a badge
      One Year In
    • Week One Done
      Scoobystu earned a badge
      Week One Done
  • Popular Contributors

    1. 1
      +primortal
      503
    2. 2
      +Edouard
      226
    3. 3
      PsYcHoKiLLa
      158
    4. 4
      Steven P.
      75
    5. 5
      FloatingFatMan
      71
  • Tell a friend

    Love Neowin? Tell a friend!