Can you live without a swap file in xp pro?

Our "pub" where you can post about things completely Off Topic or about non-silent PC issues.

Moderators: NeilBlanchard, Ralf Hutter, sthayashi, Lawrence Lee

Post Reply
~El~Jefe~
Friend of SPCR
Posts: 2887
Joined: Mon Feb 28, 2005 4:21 pm
Location: New York City zzzz
Contact:

Can you live without a swap file in xp pro?

Post by ~El~Jefe~ » Tue Feb 17, 2009 11:19 am

I was wondering..... I have 3.25gb recognized of my 4 gb's in windows xp pro. The chip is e8400, the ram is at 1066mhz. The system kinda smokes games in a big way.

Any recommendations or problems concerning not using a swap file with this much ram? I can see at times it goes to swap even though the entire program or entire game itself, could be loaded into memory.

any performance hits or issues?

jhhoffma
Posts: 2131
Joined: Mon Apr 25, 2005 10:00 am
Location: Grand Rapids, MI

Post by jhhoffma » Tue Feb 17, 2009 12:39 pm

Well, the only thing that will happen if you run out of physical RAM and have no virtual memory (swap file) to go to is a BSOD. You can certainly try it, you won't blow up your system or anything...and turn it back on if you have problems.

But pre-caching isn't always a bad thing as it aligns files that are likely to be used next to one another inside the page file. Vista has a much better prefetch system, but also knocks the hard drive more with all the indexing and stuff.

vertigo
Posts: 647
Joined: Sun Apr 17, 2005 6:09 am
Location: UK

Post by vertigo » Tue Feb 17, 2009 1:27 pm

Disabling the swap file works for most apps but some apps complain. I think setting a small page file, 32mb perhaps, would work (with all apps) although I haven't tried it.

I think there are ramdrive programs that allow you to place the page file on a ramdrive, persisted to disk on shutdown, but ramdrive.sys can't do it.

I liked Windows 98 because it was easy to enable ConservativeSwapFileUsage which didn't page anything to disk until physical memory ran out. I never understood why Microsoft didn't leave it in. Because of that, I dual-booted with Windows 98 all the way up to 2005.

About prefetching, I think it slows boot times and doesn't add performance. The argument is that unused physical memory can be put to better use but the thing is, to fill unused physical memory takes time reading the disk and I would prefer the disk to read only what it needs to (with some read ahead of course, say 64kb of read-ahead). The less disk access the better, I think.

I suspect prefetching makes Office programs load faster, which probably has more to do with how poorly written the Office programs are. I don't want a slower boot so that "New Office Document" is quicker. :lol:

~El~Jefe~
Friend of SPCR
Posts: 2887
Joined: Mon Feb 28, 2005 4:21 pm
Location: New York City zzzz
Contact:

Post by ~El~Jefe~ » Tue Feb 17, 2009 8:26 pm

so far, no problems without a swap file.

benchmarks are the same, and only thing different is that my hd hardly moves. Between scene loads on games has gone up 4x the speed on left4dead though.

andyb
Patron of SPCR
Posts: 3307
Joined: Wed Dec 15, 2004 12:00 pm
Location: Essex, England

Post by andyb » Wed Feb 18, 2009 5:30 am

I went through a phase of not having a swap file at all, but a couple of apps and games didnt like it. I tried having the minimum size of 2mb, which was fine with the apps and games that had problems, allthey required was a swap file - no specific size needed, which is stupid. Now I have a 2048mb swap file simply because I have loads of space that I am not going to use, and the performance difference with tht much RAM and whatever size swap file seems to be 0% (I have 3.5GB of usable RAM under XP Pro SP3).


Andy

dhanson865
Posts: 2198
Joined: Thu Feb 10, 2005 11:20 am
Location: TN, USA

Post by dhanson865 » Wed Feb 18, 2009 8:55 am

No swap file or a very small swap file makes sense. This will especially be an issue once your boot drive is an SSD.

~El~Jefe~
Friend of SPCR
Posts: 2887
Joined: Mon Feb 28, 2005 4:21 pm
Location: New York City zzzz
Contact:

Post by ~El~Jefe~ » Thu Feb 19, 2009 6:58 am

been several days now no swap file.

the computer moves faster from app to app, from window to dx9 mode, load screens.

and, the swap file isnt a fragmented pile of feces in your hd. lil open space where it used to be. I use O and O defrag though, so maybe it was being resorted.

just the same... no real point yet to a swap file. Curious stuff eh?

I havent tried my photoshop elements yet. I bet adobe will crash because it is written like a hunk of shit. adobe sux.

aristide1
*Lifetime Patron*
Posts: 4284
Joined: Fri Apr 04, 2003 6:21 pm
Location: Undisclosed but sober in US

Post by aristide1 » Thu Feb 19, 2009 10:15 am

I'd rather buy another USB stick, perferrable a high speed one, and place the swap file there. Or the temp IE file. Or both.

blackworx
*Lifetime Patron*
Posts: 601
Joined: Sat Dec 01, 2007 2:04 am
Location: UK

Post by blackworx » Thu Feb 19, 2009 10:45 am

~El~Jefe~ wrote:and, the swap file isnt a fragmented pile of...
The only way the swap file is going to get badly fragmented is if you let windows manage it and have a hard drive that's otherwise badly fragmented. Setting a fixed swap file size on an unfragmented drive with enough contiguous free space will ensure that the swap file stays in one place and in one piece for evermore if you so wish. You don't even need to do this on a clean install.
I bet adobe will crash because it is written like a hunk of shit. adobe sux.
Is there anything you won't dismiss out of hand with an excretory label? :P

Every running process on your PC can ask Windows for up to 2GB of RAM (or 3GB if you use the /3GB switch in boot.ini, leaving just 1GB for the kernel). Now obviously every process isn't necessarily going to ask for or use 2GB, but at some point, depending on how many processes you have running, your system will become unstable without a swap file, that is a fact. Whether you ever reach that instability tipping point depends entirely on you and the way you use your PC. If it doesn't happen, good for you; if it does happen then you'd better hope it doesn't happen when you're in the middle of something important, because by having no swap file you have given yourself a cast iron guarantee of hitting the BSOD jackpot. Big, resource-hungry apps like Photoshop will certainly push the limits, as will any app with poor memory management - and such apps are ten a penny.

There is a handy registry tweak to stop the kernel from being paged. I have found it will stop most swap file activity on a machine with plenty RAM:

HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management\DisablePagingExecutive = 00000001

~El~Jefe~
Friend of SPCR
Posts: 2887
Joined: Mon Feb 28, 2005 4:21 pm
Location: New York City zzzz
Contact:

Post by ~El~Jefe~ » Sat Feb 21, 2009 8:35 pm

is this while swap is enabled or not enabled?


lots of things are hunks of rotting feces.

blackworx
*Lifetime Patron*
Posts: 601
Joined: Sat Dec 01, 2007 2:04 am
Location: UK

Post by blackworx » Sun Feb 22, 2009 1:29 am

That's while enabled. When swap is disabled the kernel has no choice but to stay in RAM.

vertigo
Posts: 647
Joined: Sun Apr 17, 2005 6:09 am
Location: UK

Post by vertigo » Sun Feb 22, 2009 3:34 pm

Running out of virtual memory isn't such a lottery. You can watch the commit charge, you'll know when it gets close to the limit. 3GB will almost never run out.
There is a handy registry tweak to stop the kernel from being paged. I have found it will stop most swap file activity on a machine with plenty RAM.
But what you can't disable is windows' silly tendency to swap things to disk exactly at the wrong time. I wish one could configure when the swap file is accessed..

Specifically, I'd like to be able to say something like the following. Windows may immediately pend a disk read for a VM cache miss. It may not pend a VM write within 450ms of a non-VM disk access unless the VM write command is 5s old. But there are no options like that.

Post Reply