Disable The Windows Swapfile!!

Discussion in 'Windows Desktop Systems' started by Electronic Punk, Jun 2, 2002.

  1. Electronic Punk

    Electronic Punk Administrator Staff Member Political User Folding Team

    Messages:
    18,590
    Location:
    Copenhagen, Denmark
    If you ave enought memory (eg I have 512 SDRAM) you can disable the swap file, prevent any swapping and therefore observe an increase in speed.

    Thanks to mkanet for the information, here is what I did:

    Go to this registry location:

    [HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Session Manager\Memory Management]

    Then set "DisablePagingExecutive" to "1"

    Then you need to go into the advanced settings of XP for performance, and make sure you dont have swap enabled on any of your drives.

    Reboot...

    Thats it.


    -=-=-=

    I am using it now and Internet Explorer is loading instantly without even readding the HDD visably.
    Here is a screenshot of my task manager and as you can see mym commit charge is tiny... Reduced from 200 megs before running this tweak, let me know how you guys get on...
     
  2. NetRyder

    NetRyder Tech Junkie Folding Team

    Messages:
    13,256
    Location:
    New York City
    Its a gr8 tip for those of us who have a lot of RAM!! :)

    One problem though: If you have the Paging File disabled, Adobe Photoshop won't open up. Photoshop needs virtual memory enabled ... just thought I should point this out.

    I luv tweaking!! :p
     
  3. Iceman

    Iceman Moderator

    Messages:
    2,695
    yes that is the only draw back I see in it :(
     
  4. BMWCHUBB

    BMWCHUBB Guest

    p/s/p

    :) What about paint shop pro???
     
  5. allan

    allan Guest

    I recommend against disabling the paging file no matter how much memory you have. You can simply set it to a small number (50 mb -- 100 mb, whatever) and that will insure that any programs that look for a swap file will be able to run, yet it is small enough that it will not be a drag on performance (assuming you believe that a swapfile can be a drag....I have 512mb w/a 768 mb static swap file and I'm very happy with the performance of my system - but certainly everyone is different).
     
  6. jeh

    jeh Guest

    Sorry, but this is "common misconception number 312" (or maybe 313; I lose track).
    This only disables paging of certain parts of the OS, not paging in general. It's an unnecessary mod at best -- if you have enough RAM, the parts of the OS you are using will stay in memory anyway; if you don't have enough RAM, you really WANT the OS to be pageable just like everything else.
    That would be "paging", not swapping (big difference), but anyway --

    Windows XP is a virtual memory operating system. It will ALWAYS page from and to disk; this is an essential part of how a VM OS works.

    For a given workload and a given amount of RAM, there always will be about the same amount of paging to and from disk. All you are doing by getting rid of the pagefile is making the OS page more to other files.

    There MAY be a small performance benefit, depending on what types of virtual address space (those backed by the paging file, vs. those backed by other files) are being accessed more often. There can just as easily be a performance hit.

    Getting rid of the paging file also drastically increases your chances of seeing the infamous "running low on virtual memory" popup. Think of the paging file as a safety net. If you don't need it, having it there doesn't hurt anything. If you do need it, it's really better to have it than to hit the ground...
    Post hoc fallacy. You rebooted, right? Everything's different.
    "Commit charge" is not the amount of stuff in the paging file. It is the amount of virtual memory currently allocated of the type that is backed by the paging file (if any), if it can't all be kept in RAM. But on systems with today's typical large RAM loads, most of the "commit charge" is actually in RAM.

    Btw, the "PF usage" graph is the same as the "commit charge" counter. Does it not strike you as odd that your system shows a nonzero "PF usage", even though you have no paging file? That is because "PF usage" shows only the ... well, I explained it above.

    If you want to know how much is REALLY *in* the paging file, see the Performance applet, Pagefile object, %usage counter.
     
  7. BMWCHUBB

    BMWCHUBB Guest

    Re: Re: Disable The Windows Swapfile!!

    WHEN I D O that i get vss errors?
     
  8. Electronic Punk

    Electronic Punk Administrator Staff Member Political User Folding Team

    Messages:
    18,590
    Location:
    Copenhagen, Denmark
    Well, I will go spank my sources. A good read. Thanks for the info.
     
  9. xsivforce

    xsivforce Prodigal Son Folding Team

    Messages:
    8,547
    Location:
    Texas, USA
    [​IMG]
     
  10. BMWCHUBB

    BMWCHUBB Guest

    women

    :eek: your a very tame women??:eek:
     
  11. jeh

    jeh Guest

    Re: Re: Re: Disable The Windows Swapfile!!

    When you do what? Try to run the Performance applet? You didn't disable the "performance logs and alerts" service, did you? :D
     
  12. Allan brings out a good point. Some programs will not work without a swapfile, regarding of how much RAM your computer has. Just set it to a small fixed size, such as 50 - 100 MB.
     
  13. Dirk Diggler

    Dirk Diggler Guest

    Just thought I'd say hello to Frank.
    Hello Frank :p
     
  14. Perris Calderon

    Perris Calderon Moderator Staff Member Political User

    Messages:
    12,332
    Location:
    new york
    Frank, jeh brings out good points concerning the swap file...are you saying you dissagree with him?
     
  15. Hello, Dirk. I just signed up with this forum today. It's good to see some of you guys on this forum, like TweakXP and SpeedGuide.

    Dealer, my only disagreement with any posts on this thread would be with someone who says to disable virtual memory(the swapfile) completely. I think that the majority of us will agree that a swapfile, even a small one, is necessary to have, in order to keep ALL programs running.
     
  16. Perris Calderon

    Perris Calderon Moderator Staff Member Political User

    Messages:
    12,332
    Location:
    new york
    Hi Frank...I saw your website...excellant...you should post the link, I don't have it.

    I asked if you dissagreed with jeh, because he's saying a large swap file is neccesary for smoothe performance,...that xp will page somewhere else if the swap file is too small...

    I can't find the link to his thoughts, but I'll post something later today...for now, this is a start...he's got a more in depth explanation over at tweak...give his name a search
     
  17. Thanks for the nice comment about my website, Dealer. I'm still pretty new to XP and have a lot to learn about it, so my website is directed towards those who still use 95 and 98(I still have 98SE on my desktop and still enjoy using it). For the benefit of anyone else who wants to look at it, the URL is http://9337387.home.icq.com/index.html :D Jeh may be right about the swapfile, but I'm not experienced enough to question his theory.
     
  18. jeh

    jeh Guest

    Er, no. Those two sentences aren't equivalent.

    If you change the first one to read "large enough", and the second to "XP will simply page more to other files if the page file is too small", that's much closer.

    Which begs the question, what's "large enough"? With 512 MB or more RAM and a light app mix (no huge Photoshop edits, for ex.) 50 or 100 MB might well be plenty. If you want to be precise, go to Perfmon, Pagefile object, and look at the "%usage peak" counter. Multiply by your current pagefile size. That's your bare minimum. You probably want it to be at least double that size, though, probably more like four times, to avoid free space allocation delays. (so much for being precise!)

    The other side of the coin is that a too-large pagefile doesn't hurt anything, except of course the loss of disk space; it in no way encourages more paging to disk. Again, think of a safety net... a larger one doesn't encourage you to fall more; it just provides better coverage in case you do fall.
     
  19. Dirk Diggler

    Dirk Diggler Guest

    Well I take my hat off to JEH. Nice and understandable for us idiots out here.

    And also to dealer for making JEH reply
     
  20. Jeh:

    I've got a 30 GB hard drive on my Windows XP laptop, so conserving hard drive space isn't a real issue with me, especially since 26 GB of it is still free.

    If a 50 - 100 MB swapfile is going to do the job though, I see no sense in me using a 768 MB swapfile.

    Just MY personal preference. :)