Home | Blog | Software | Reviews and Features | Forum | Help | Donate | About us
topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • December 03, 2016, 05:58:53 PM
  • Proudly celebrating 10 years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Last post Author Topic: Does it make sense to disable the windows swap file?  (Read 27193 times)

masu

  • Member
  • Joined in 2006
  • **
  • default avatar
  • Posts: 401
    • View Profile
    • Donate to Member
Does it make sense to disable the windows swap file?
« on: July 06, 2008, 06:20:22 AM »
Does it make sense to disable the windows swap file?
Will I get a speed improvement with this?
Find+Run Robot 2.90.01
Windows 7

f0dder

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 9,029
  • [Well, THAT escalated quickly!]
    • View Profile
    • f0dder's place
    • Read more about this member.
    • Donate to Member
Re: Does it make sense to disable the windows swap file?
« Reply #1 on: July 06, 2008, 06:41:09 AM »
If you have enough RAM, you likely won't feel much of a speed difference - windows does tend to page out stuff even when not strictly necessary, though, so you can save some disk access. I've personally run without pagefile since I got 1gig of memory, but you really need 2gig to do it without problems. These days I have 8 gigs, so running with pagefile seems pointless ;)

Btw you can only disable the pagefile if you run XP or newer, win2k can't.
- carpe noctem

masu

  • Member
  • Joined in 2006
  • **
  • default avatar
  • Posts: 401
    • View Profile
    • Donate to Member
Re: Does it make sense to disable the windows swap file?
« Reply #2 on: July 06, 2008, 07:14:30 AM »
I have 2GB Ram and Windows XP. I have now disable the Swap File. It seems so that the PC runs a little bit smoother. ;)
Find+Run Robot 2.90.01
Windows 7

Carol Haynes

  • Waffles for England (patent pending)
  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 7,986
    • View Profile
    • Dales Computer Services
    • Donate to Member
Re: Does it make sense to disable the windows swap file?
« Reply #3 on: July 06, 2008, 07:40:32 AM »
You shouldn't have no swap file at all - and you should have a small swap file on the windows drive (64Mb minimum). Without a 64Mb swap file on the OS partition you won't be able to use any debugging messages from Windows when there is a problem. In order to trace system faults Windows needs to produce a 'mini-dump' and can't do that without at least a 64Mb Pagefile.sys on C: (or whichever drive windows is installed to).

I have 2Gb of memory for Windows XP Pro and use a PageFile on a separate drive. I work on the principle that windows is fairly optimised to use RAM if possible but it doesn't hurt to have idle applications sitting on the swap file. If you only have RAM everything has to sit in memory. Certainly if you use large apps like PhotoShop etc. you would be disadvantaged with no pagefile - especially if you want to run multiple large apps.

If you want to get rid of the swap file you need to run your machine lean and mean. Get rid of everything form the system tray and only load it when you need it. Don't use loads of Explorer addins - once they load they take up memory even if you don't use them. If they are idle they are precisely the sort of stuff that gets swapped and quite correctly.

f0dder

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 9,029
  • [Well, THAT escalated quickly!]
    • View Profile
    • f0dder's place
    • Read more about this member.
    • Donate to Member
Re: Does it make sense to disable the windows swap file?
« Reply #4 on: July 06, 2008, 08:00:57 AM »
Not everybody needs minidumps, though - especially considering most users don't know how to diagnose them. And they only happen on BSODs anyway, so on a well-working computer... you're not even going to see them. Dunno if you need a 64meg pagefile for that though, a minidump itself is only 64kbyte (128kbyte for 64bit windows).

The problem with pagefile on windows is that it tends to page out stuff even when it doesn't need to. I go by the principle that unused RAM is wasted RAM, while windows seems to prefer trimming working sets even when there's still plenty of free RAM - and this means paging stuff out to disk. Paging out and reading back in is slow.

With one gigabyte RAM, I had to re-enable pagefile temporarily every now and then, I had a few games that would crash otherwise. But with 2 gigs and up, I've never faced an out-of-memory situation, even though I've been running a lot of fairly memory-hungry applications at the same time (visual studio, vmware, et cetera).

How much or how little performance you gain by disabling the pagefile might be a bit of a religious issue - the system "feels a bit smoother", but nothing I can quantize, really. But knowing that I get less disk writes is a nice feeling.
- carpe noctem

tomos

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 10,315
    • View Profile
    • Donate to Member
Re: Does it make sense to disable the windows swap file?
« Reply #5 on: July 06, 2008, 08:08:22 AM »
You shouldn't have no swap file at all - and you should have a small swap file on the windows drive (64Mb minimum). Without a 64Mb swap file on the OS partition you won't be able to use any debugging messages from Windows when there is a problem. In order to trace system faults Windows needs to produce a 'mini-dump' and can't do that without at least a 64Mb Pagefile.sys on C: (or whichever drive windows is installed to).

is that courtesy of that DrWatson thingy?
It would (usually) seize up my computer if a programme crashed - microsoft told me to disable it (their solution to the problem - others were obviously having the same problem cause there was a page dedicated to the problem)

EDIT/ dug up the ms link - error report for the Drwtsn32.exe debugger
Tom
« Last Edit: July 06, 2008, 08:16:20 AM by tomos »

f0dder

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 9,029
  • [Well, THAT escalated quickly!]
    • View Profile
    • f0dder's place
    • Read more about this member.
    • Donate to Member
Re: Does it make sense to disable the windows swap file?
« Reply #6 on: July 06, 2008, 08:14:21 AM »
tomos: the application minidumps (ie., a standard program that crashes and fires up DrWatson) don't require pagefile - only the BSOD-produced dumps.
- carpe noctem

tomos

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 10,315
    • View Profile
    • Donate to Member
Re: Does it make sense to disable the windows swap file?
« Reply #7 on: July 06, 2008, 08:15:10 AM »
tomos: the application minidumps (ie., a standard program that crashes and fires up DrWatson) don't require pagefile - only the BSOD-produced dumps.

gotcha :)
Tom

nudone

  • Cody's Creator
  • Columnist
  • Joined in 2005
  • ***
  • Posts: 4,117
    • View Profile
    • Donate to Member
Re: Does it make sense to disable the windows swap file?
« Reply #8 on: July 06, 2008, 08:56:48 AM »
perhaps it's just the combination of hardware i have and the software i use but i DO think there is a performance difference with a disabled swap file.

with swap file disabled: no difference within a single program (but i'm wondering if illustrator may even swap between open files quicker too), but when i have several open at once and i'm swapping between them i'm sure they are more responsive to update on screen - even ones that i've closed a few minutes ago.

i might do some comparisons as i might be lying to myself.

typical apps open: several adobe apps, browsers, outlook.

hardware: raptors in raid 0, 4 gig ram (okay so 1 gig of that is taken by xp).

Carol Haynes

  • Waffles for England (patent pending)
  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 7,986
    • View Profile
    • Dales Computer Services
    • Donate to Member
Re: Does it make sense to disable the windows swap file?
« Reply #9 on: July 06, 2008, 09:20:14 AM »
Adobe apps use their own page file system anyway - which is why you can edit huge files (bigger than memory). I suppose if you are working on small files and don't have huge numbers of 'history' entries it may all stay in memory.

mrainey

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 436
    • View Profile
    • Website
    • Donate to Member
Re: Does it make sense to disable the windows swap file?
« Reply #10 on: July 06, 2008, 01:07:51 PM »
A month ago I disabled the paging file on my 2GB XP system (inspired by f0dder).  No problems so far, no dramatic improvements either.  I do like the idea of less disk access - seems like it would have to be a little bit faster, plus result in less wear and tear on the drive.
Software For Metalworking
http://closetolerancesoftware.com

lanux128

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 6,258
    • View Profile
    • Coding Snacks by Lanux128
    • Read more about this member.
    • Donate to Member
Re: Does it make sense to disable the windows swap file?
« Reply #11 on: July 06, 2008, 08:52:21 PM »
thanks f0dder, you've convinced me to take advantage of the 2GB RAM on my system.

f0dder

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 9,029
  • [Well, THAT escalated quickly!]
    • View Profile
    • f0dder's place
    • Read more about this member.
    • Donate to Member
Re: Does it make sense to disable the windows swap file?
« Reply #12 on: July 06, 2008, 09:05:13 PM »
thanks f0dder, you've convinced me to take advantage of the 2GB RAM on my system.
You can always give it a try and see how it works out for you :) - if you get into a low-memory situation, you'll get a messagebox from windows nagging about low memory, and you can add a pagefile without having to reboot (disabling pagefiles require reboot though). Do keep in mind that not all applications handle a failure to allocate memory gracefully, but with 2 gigs of ram that shouldn't happen under normal circumstances.

Even after having firefox3 running for 8-10 hours, windows live messenger, a bunch of the usual tray-icon stuff and playing Mass Effect (one of those pretty resource-heavy modern games), my physical memory utilization peaked out at about 1.5gigs. And after exiting back to desktop, the nice thing with no pagefile is that everything is smooth right away, without any paging activity going on.

Success will obviously depend on what you're doing, though. You probably can't expect to run a couple of vmware OSes, photoshop, premiere, visual studio, folding@home, firefox2-after-12-hours and a 3D shooter at the same time with 2 gigs of ram and no paging file... ;) 8) :P
- carpe noctem

lanux128

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 6,258
    • View Profile
    • Coding Snacks by Lanux128
    • Read more about this member.
    • Donate to Member
Re: Does it make sense to disable the windows swap file?
« Reply #13 on: July 06, 2008, 09:11:28 PM »
if you can play Mass Effect with WLM in the tray, then i'd call it a success. :up: Firefox is generally well-behaved on my system so i'm going to disable the swap file after concluding some tasks ahead. ;)

f0dder

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 9,029
  • [Well, THAT escalated quickly!]
    • View Profile
    • f0dder's place
    • Read more about this member.
    • Donate to Member
Re: Does it make sense to disable the windows swap file?
« Reply #14 on: July 06, 2008, 09:15:10 PM »
if you can play Mass Effect with WLM in the tray, then i'd call it a success. :up: Firefox is generally well-behaved on my system so i'm going to disable the swap file after concluding some tasks ahead. ;)
Do keep in mind that this is on an 8-gig system - but process explorer didn't report more than ~1.5gig physical memory usage.

FF3 is well-behaved, FF2 was a real bloody mess after more than just a few hours... after 8 hours of having facebook more or less constantly running in the background, as well as opening and closing various forum tabs, and checking news from RSS feeds (at least a couple of times an hour on a regular day), FF2 by itself would usually end up consuming 1.3+ gigs of ram :p
- carpe noctem

40hz

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 11,768
    • View Profile
    • Donate to Member
Re: Does it make sense to disable the windows swap file?
« Reply #15 on: July 06, 2008, 10:54:45 PM »
I'm have 1.5 Gb physical RAM and I'm running without a pagefile except for very special circumstances. I haven't run into any problems to date (knock wood!). I also can't say I've seen any significant performance boost not having a pagefile, but I have a pretty fast box to begin with so maybe I just don't notice it.

Quote
FF3 is well-behaved, FF2 was a real bloody mess after more than just a few hours... after 8 hours of having facebook more or less constantly running in the background, as well as opening and closing various forum tabs, and checking news from RSS feeds (at least a couple of times an hour on a regular day), FF2 by itself would usually end up consuming 1.3+ gigs of ram :p

Interesting! I keep FF2 open from when I boot to when I shut down and I never ran into that. I've got a ton of add-ons active and Sage RSS Reader is permanently open. My FF2 memory usage fluctuates between 135 and 200 Mb no matter what. Does Facebook (which I don't use) have something to do with that?
« Last Edit: July 06, 2008, 11:09:50 PM by 40hz »

wreckedcarzz

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 1,623
    • View Profile
    • Donate to Member
Re: Does it make sense to disable the windows swap file?
« Reply #16 on: July 06, 2008, 11:15:07 PM »
Does it make sense to disable the windows swap file?
Will I get a speed improvement with this?

In my experiences, if you have 2GB of RAM you should be fine. If your playing Crysis on that 2GB of RAM, your screwed ;D (personal experience)
(BTW, on Vista I have never gotten a "low memory" error message, but AERO will disable itself until next reboot... a pain IMO)

You probably can't expect to run a couple of vmware OSes, photoshop, premiere, visual studio, folding@home, firefox2-after-12-hours and a 3D shooter at the same time with 2 gigs of ram and no paging file... ;) 8) :P

EDIT: Photoshop, VS, D2OL (similar to F@H), FF3 after 24+ hours no closing, and Sauerbraten... no PF. Hehehe.
« Last Edit: July 06, 2008, 11:18:45 PM by wreckedcarzz »

f0dder

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 9,029
  • [Well, THAT escalated quickly!]
    • View Profile
    • f0dder's place
    • Read more about this member.
    • Donate to Member
Re: Does it make sense to disable the windows swap file?
« Reply #17 on: July 07, 2008, 06:30:28 AM »
Interesting! I keep FF2 open from when I boot to when I shut down and I never ran into that. I've got a ton of add-ons active and Sage RSS Reader is permanently open. My FF2 memory usage fluctuates between 135 and 200 Mb no matter what. Does Facebook (which I don't use) have something to do with that?
Facebook is definitely very ill-behaved :) - after several hours of use, it could take up to 30-40 seconds from clicking a link in facebook until the page was loaded... and that with full browser freeze until the loading was done. The browser would also generally be affected, things like opening new tabs would be pretty slow etc.

But the optimized JavaScript engine and the lovely new memory allocator (as well as lots of fixed leaks and improved garbage collection) in FF3 has taken care of most of this. Sure, After 12+ hours of use, the memory usage can creep to 300+ megabytes. But facebook no longer slows to a crawl. Also, on FF2 right after a clean boot, opening new tabs would become slowly but steadily (and noticeably) slower - when clicking 10+ forum notify emails, opening the last tabs (or just new blank tabs with ctrl+t) could take perhaps up to ~300ms or more. FF3 has also fixed this.
- carpe noctem

lanux128

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 6,258
    • View Profile
    • Coding Snacks by Lanux128
    • Read more about this member.
    • Donate to Member
Re: Does it make sense to disable the windows swap file?
« Reply #18 on: July 07, 2008, 09:17:22 AM »
not bad, interchanging Excel spreadsheet with Firefox (10+ tabs) for over a couple of hours, WinAmp in the background and full complement of apps in the sytray. no visible speed improvements but yet again no errors, and thankfully no hard-disk grinding. hmm, maybe i'll just load Gothic 3 and see how it goes. j/k, of course.. ;)

justice

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,898
    • View Profile
    • Donate to Member
Re: Does it make sense to disable the windows swap file?
« Reply #19 on: July 07, 2008, 09:33:43 AM »
you might find this useful:

Disable Paging File  Disable the Paging File  Negative  Warning

Myth - "Disabling the Paging File improves performance."

Reality - "You gain no performance improvement by turning off the Paging File. When certain applications start, they allocate a huge amount of memory (hundreds of megabytes typically set aside in virtual memory) even though they might not use it. If no paging file (pagefile.sys) is present, a memory-hogging application can quickly use a large chunk of RAM. Even worse, just a few such programs can bring a machine loaded with memory to a halt. Some applications (e.g., Adobe Photoshop) will display warnings on startup if no paging file is present." - Source

"In modern operating systems, including Windows, application programs and many system processes always reference memory using virtual memory addresses which are automatically translated to real (RAM) addresses by the hardware. Only core parts of the operating system kernel bypass this address translation and use real memory addresses directly. All processes (e.g. application executables) running under 32 bit Windows gets virtual memory addresses (a Virtual Address Space) going from 0 to 4,294,967,295 (2*32-1 = 4 GB), no matter how much RAM is actually installed on the computer. In the default Windows OS configuration, 2 GB of this virtual address space are designated for each process' private use and the other 2 GB are shared between all processes and the operating system. RAM is a limited resource, whereas virtual memory is, for most practical purposes, unlimited. There can be a large number of processes each with its own 2 GB of private virtual address space. When the memory in use by all the existing processes exceeds the amount of RAM available, the operating system will move pages (4 KB pieces) of one or more virtual address spaces to the computer's hard disk, thus freeing that RAM frame for other uses. In Windows systems, these "paged out" pages are stored in one or more files called pagefile.sys in the root of a partition. Virtual Memory is always in use, even when the memory required by all running processes does not exceed the amount of RAM installed on the system." - Source
actually after reading that it doesn't bring that much to the discussion but at least it has sources, and for completeness..
« Last Edit: July 07, 2008, 09:37:35 AM by justice »

f0dder

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 9,029
  • [Well, THAT escalated quickly!]
    • View Profile
    • f0dder's place
    • Read more about this member.
    • Donate to Member
Re: Does it make sense to disable the windows swap file?
« Reply #20 on: July 07, 2008, 09:39:18 AM »
justice: we already had a DC thread about that "XP Myths" page... basically, the guy only almost knows what he's talking about.

Virtual memory, as in using a paging file, is not always in use. On XP and later, you can disable the pagefile (but not on win2k and previous). However, it's obvious why you can get a bit confused about matters, since you cannot (when running windows) turn off the x86 protect-mode feature called "paging". Which is related to (and used by) disk paging, but does not imply it.
- carpe noctem

justice

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,898
    • View Profile
    • Donate to Member
Re: Does it make sense to disable the windows swap file?
« Reply #21 on: July 07, 2008, 09:40:43 AM »
ah ok maybe someone needs to write an Xp Myths Myths page then.

f0dder

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 9,029
  • [Well, THAT escalated quickly!]
    • View Profile
    • f0dder's place
    • Read more about this member.
    • Donate to Member
Re: Does it make sense to disable the windows swap file?
« Reply #22 on: July 07, 2008, 09:56:22 AM »
ah ok maybe someone needs to write an Xp Myths Myths page then.
Basically did that in that thread ;), and it ended up very heated... probably the only thread I've seen on DC that became uncomfortable.
- carpe noctem

40hz

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 11,768
    • View Profile
    • Donate to Member
Re: Does it make sense to disable the windows swap file?
« Reply #23 on: July 07, 2008, 10:28:52 AM »
ah ok maybe someone needs to write an Xp Myths Myths page then.
Basically did that in that thread ;), and it ended up very heated... probably the only thread I've seen on DC that became uncomfortable.

An XP Myth thread ended up getting very heated? :lol: Boy does that ever prove we are a bunch of techno-wankers here at DC.

Sure does feel good to finally have a home! :Thmbsup: :Thmbsup: :Thmbsup:

tomos

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 10,315
    • View Profile
    • Donate to Member
Re: Does it make sense to disable the windows swap file?
« Reply #24 on: July 07, 2008, 11:22:13 AM »
just btw:
I have a (very) old version of photoshop (5.5)
wont run unless I have a paging file & I do use it fairly regularly so I have a paging file again :)
Tom