Pagefile.sys

Page 15 of 19 FirstFirst ... 51314151617 ... LastLast

  1. Posts : 173
    Windows
       #141

    Let me quote him from his Windows Internals book:

    Because Windows can run with no paging file, page-file-backed sections might in fact be
    “backed” only by physical memory.
    And those sections are used everywhere. No applications would work without the page file, if your statement was true.
      My Computer


  2. Posts : 568
    Windows 7 64-bit, Windows 8.1 64-bit, OSX El Capitan, Windows 10 (VMware)
       #142

    Wishmaster said:
    As we are all ware, a 32 bit application only gets 2GB of address space.

    I too was under the assumption that that consisted of Physical and Virtual memory.

    But through the course of this, I too am left questioning:
    Why do some applications crash, or refuse to run if a PF is not present?
    Even if theres plenty of physical memory?


    Perhaps, when a application (such as in my example) starts hitting its 2GB limit in physical memory, it starts paging it out. Effectively giving the app more space.

    This was just a thought, and Im looking for a definitive answer myself.
    I did think address space was Physical + Virtual.

    For the record, I too have experimented with no PF at all. And for the most part, everything seemed OK. But I did run into a few issues, and have since just left it on. IMHO, there as really nothing gained from it being off.
    Windows has a memory manager that handles the memory requests from the applications. Since the physical memory can be limited and ran out of rather quickly depending the size of the memory, the page file has become a necessity for multitasking. This has been more of a concern in the past; however, application people with their appetite for more virtual memory, they ensure that this is always an issue...

    The sum of the physical memory and the pagefile is the virtual memory. This can be large in the case of the 64-bit OS, but applications can receive 4 GBs of that if they can use the Address Windowing Extensions, or AWE API. Otherwise apps are getting 2 GBs as you've mentioned.

    Quote from the link above:

    "The size of the virtual address space is not changed. 32 bit addresses are still used. What is done is that different RAM pages are mapped into application specified virtual addresses. Although exercising this mapping has an overhead, since the mapped pages are in RAM, the overhead is considerably less than reading and writing to a disk file."

    That sounds to me that there is some performance benefit for disabling the page file that forces using the physical memory only. While it may sound so, there's no guarantee that it is so. And certainly, some applications that call for more virtual memory than windows has available will tank, no question about that.

    On an individual level and non-critical systems, such as home workstation, disabling the pagefile is a personal preference. I certainly would not do it for any servers, or even for my work desktop/laptop. On my home machine the worst thing can happen is one reboot, if the out of memory error shows up...
      My Computer


  3. Posts : 2,528
    Windows 10 Pro x64
       #143

    pallesenw said:
    Because, as mentioned previously, there *are* allocation function flags that will physically back a page in memory with a page in the paging file (mapping views of files, for example, come to mind right away). If the application makes one of these API calls, and there's no PF, you get a failed allocation. If the app doesn't handle this / allow this properly or at all, then you get a second chance exception, and an app crash (and that may actually be the desired behavior as well).
    Not true. There are no such flags. This again are just rumours floating around.

    If you read carefully what Mark Russinovich has to say about the allocation functions, he too will telll you that it is not true. Those page file-backed sections do NOT need a page file. The name just confuses many people.
    Well, not necessarily - if an applications maps a file section and tracks it, and then said application gets a return value that it doesn't like (or calls to grab that section from a paging file that doesn't exist, etc), the application can still crash. That's the whole point - why some apps "do not like running with no paging file". I didn't mention it's the memory manager's fault, did I? . No, it's poor coding, usually, but that doesn't mean it's not possible. It's not a rumor, otherwise it wouldn't be possible. Poor design can sometimes mean you run with a paging file to satisfy a poorly-written app that makes assumptions, because it's easier (usually) than getting the vendor to rewrite portions of the application, especially when those applications are old and decrepit, no longer supported/maintained, etc.

    I'm not confused, just a realist (I know how the memory manager works pretty well). Mark is right, but he also speaks about a perfect world where application developers don't do stupid things. You and I should both know that isn't where some of these applications live .
      My Computer


  4. Posts : 173
    Windows
       #144

    cluberti, you argued that an application could pass a flag to a memory allocation function and fail if there is no page file.

    That is the argument that is not true. You cannot call any allocation function and have it fail just because there is no page file. If it fails because you are low on memory then that is another matter and is irrelevant to this discussion.

    I say irrelevant, because we have already made it clear that if your commit limit is not enough to accommodate your needs - then of course you need a xxx MB large page file.
      My Computer


  5. Posts : 2,528
    Windows 10 Pro x64
       #145

    OK, fail is a bad word without context, although that ultimately is what happens. Note that it's not the memory manager failing, it's the app making the API call and then being stupid based on the return - I suppose I could make it clearer next time.
      My Computer


  6. Posts : 686
    Windows 7 x64 Ultimate SP1
       #146

    I have it set to default, I have more than enough disk space. Soo, it takes 6054 MB.

    I look at the page file usage in SIW. I've seen it go to 0. Yes, zero, not capital O. Usually it's in the vicinity of 100 MB.

    Therefore I say - leave it alone. Windows does a good job managing it. What's the point of 'tweaking' it other than empty enjoyment of looking at your UNUSED free space.
      My Computer


  7. Posts : 173
    Windows
       #147

    Cr00zng said:
    That sounds to me that there is some performance benefit for disabling the page file that forces using the physical memory only.
    The link and quote is about AWE. AWE is not about the page file, but about addressing physical memory in chunks (a chunk is a "window" that points to your physical ram). It is an API that can be used to address huge amount of physical ram - even if your virtual address space is limited. It is not used much.
      My Computer


  8. Posts : 7,878
    Windows 7 Ultimate x64
       #148

    I think I'm going to buy a Revo drive and dedicate my 80GB Intel SSD to a page file drive.
      My Computer


  9. Posts : 2,528
    Windows 10 Pro x64
       #149

    I believe, unless I'm forgetting something really old, that the only Microsoft server product to use AWE is/was SQL server, and given Win2008 R2 no longer has a 32bit variant available this won't continue once older OSes are dropped. Oracle used to have versions of their server products that used this as well (and I assume there are of course others), but it is indeed pretty rare.

    Running with no paging file on a large system is fine, as long as you're sure your usage patterns will never try to commit more VA to RAM than you actually have available. For home use, go for it - for servers, be really careful. For any sort of production use, don't do it. It's not worth the possible BSOD, at least in my opinion. You don't want that to be the reason some really important machine crashes in the middle of something that absolutely can't be lost, etc.
      My Computer


  10. Posts : 568
    Windows 7 64-bit, Windows 8.1 64-bit, OSX El Capitan, Windows 10 (VMware)
       #150

    One interesting note that best described by pictures...

    Just a short test with the pagefile disabled shows this for page faults monitoring:

    Pagefile.sys-no_pf.png

    There are still page faults and pages per second, both can max out the 500 chart limit, but no writes. Enabling the pagefile, system manage, for two of my HDD's shows this:

    Pagefile.sys-pf.png

    Granted the period had been short, but there was a write even if the memory utilization has never reached 50% with most of my programs running.

    Anyone knows why Windows keep "paging" if there's no pagefile? Unless it uses the "cashed memory" for this purpose, but shouldn't it show writes as well?

    At idle, my system has this physical memory utilization:

    Pagefile.sys-ram-use.png

    Since I don't use many programs at once, the available memory seemed more than enough for programs. I still believe that, but need to look at what are these pages for, if there is no write...
      My Computer


 
Page 15 of 19 FirstFirst ... 51314151617 ... LastLast

  Related Discussions
Our Sites
Site Links
About Us
Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 22:57.
Find Us