Disable The Windows Swapfile!!

Electronic Punk

willalwaysbewithyou
Staff member
Political User
#1
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
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
 
A

allan

Guest
#5
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).
 
J

jeh

Guest
#6
Originally posted by Electronic Punk
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.
Sorry, but this is "common misconception number 312" (or maybe 313; I lose track).
Then set "DisablePagingExecutive" to "1"
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.
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.
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...
I am using it now and Internet Explorer is loading instantly without even readding the HDD visably.
Post hoc fallacy. You rebooted, right? Everything's different.
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...
"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.
 
B

BMWCHUBB

Guest
#7
Re: Re: Disable The Windows Swapfile!!

Originally posted by jeh

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.
WHEN I D O that i get vss errors?
 
J

jeh

Guest
#11
Re: Re: Re: Disable The Windows Swapfile!!

Originally posted by BMWCHUBB
WHEN I D O that i get vss errors?
When you do what? Try to run the Performance applet? You didn't disable the "performance logs and alerts" service, did you? :D
 
F

Frank Lavallee

Guest
#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.
 
F

Frank Lavallee

Guest
#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.
 

Perris Calderon

Administrator
Staff member
Political User
#16
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
 
F

Frank Lavallee

Guest
#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.
 
J

jeh

Guest
#18
Originally posted by dealer
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...
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.
 
D

Dirk Diggler

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

And also to dealer for making JEH reply
 
F

Frank Lavallee

Guest
#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. :)
 

Members online

No members online now.

Latest posts

Latest profile posts

Perris Calderon wrote on Electronic Punk's profile.
Ep, glad to see you come back and tidy up...did want to ask a one day favor, I want to enhance my resume , was hoping you could make me administrator for a day, if so, take me right off since I won't be here to do anything, and don't know the slightest about the board, but it would be nice putting "served administrator osnn", if can do, THANKS

Been running around Quora lately, luv it there https://tinyurl.com/ycpxl
Electronic Punk wrote on Perris Calderon's profile.
All good still mate?
Hello, is there anybody in there? Just nod if you can hear me ...
Xie
What a long strange trip it's been. =)

Forum statistics

Threads
61,970
Messages
673,297
Members
89,016
Latest member
Poseeut