Running without swapfile

Associate
Joined
7 Jun 2009
Posts
394
Location
East mids.
I always tend to disable virtual memory whenever possible, because I hate the slow down, and am wondering how much ram you'd need with win7pro64 to do this and still be able to run most programs like office, games, etc?

On windows XP I found as little as 2-4gb will do, so does anyone do the same in Win7, and how much ram do you use?

Thanks. :)
 
I would personally never disable the swapfile, unless you want some unexpected hangs/BSODs.

Windows will manage it just fine, and if your machine is slowing down, then you should be looking at other things than the swapfile, as that only gets used when the memory is full, so that's not the problem.
 
I never get BSOD's/hangs from disabling swap. It's common practise in some security conscious sectors like the one I work in (lessens the chance of unencrypted data being written to disk).

Weird, wonder what makes people think you can't run a stable system without swap? An XP machine will even play GTA4 without any swap with only 3 gigs of ram.

But windows does seem to mess about writing to swap even when ram is not full, hence the slight performance boost if you can prevent this altogether.

edit: Maybe things are different in Win7 to the NT/XP machines that we use at work, I dunno - I just know that on our machines disabling swap gives a slight boost - if anyone knows of a reason why windows 7 would need swap even when it would have enough ram i'll leave it enabled, but surely you're better off if the system can all run on RAM rather than a much slower HDD, or even SSD - the speeds are just light years apart?
 
Last edited:
only gets used when the memory is full, so that's not the problem.

Not quite - The memory management decides what goes to the page file or not. Data thats' not been used for awhile, for example but i share the same opinion that the swap file shouldn't be disabled.

OP you could try moving the the page file to another physical disk or USB speed Boost (ready boost).
 
Currently I am running my pagefile on a ram disk. It is not the same thing as not having a pagefile - but I have read that even if you would disable the pagefile, windows would use some portion of the disk as a pagefile anyways!(but I may be wronge on this)

Running the pagefile on the ramdisk seems more snappier in windows tasks and it did give me higher 3dm06 marks - but nothing to get over excited about.

There was an article on custompc mag about this thing - I will try to dig it up if I have some time.
 
What happens when the ram is full though, does the system dump older data from RAM to make room for new data? that could cause problems.

Ideally I guess a dynamic page file would be better, one which ddoesn't exist unless needed and is created and re-sized on the fly. But then there would be overhead associated with that. Maybe better is if a pre determined page file existed that would only be used for data that's deemed older, or not as relevant as other data held in RAM.

Then again, newer operating systems are said to be pretty good at memory management. Yes the page file is used when there's still free RAM, but I assume its data that's been deemed 'not on current use and not likely to be'

Still its hard to male that call without some scientific benchmarks and knowing exactly how the OS decides to page something.
 
I never get BSOD's/hangs from disabling swap. It's common practise in some security conscious sectors like the one I work in (lessens the chance of unencrypted data being written to disk).

I recomend disc encryption if they are that security conscious :P ...
 
What happens when the ram is full though
Dunno about Win7 but in XP when you try to load the program that caused the ram to be full, it would just give you a dialog box letting you know there's not enough memory. So you just free up some ram and then it works. But what I'm talking about is simply having enough ram so this never happens (on XP 4gb does the trick for everything I use the machine for). I was just wondering if anyone knew what the equivalent amount needed in Win7 was.

Running the pagefile on the ramdisk seems more snappier in windows tasks and it did give me higher 3dm06 marks - but nothing to get over excited about.

There was an article on custompc mag about this thing - I will try to dig it up if I have some time.
Sounds interesting, can't hurt to see what happens eh? Thanks :)
 
Last edited:
page files on a ram disc, is windows memory managment that bad?

sounds like a way to slow things down to me.. (as you reduce total memory)
 
I used to run without a page file with ~6gb of RAM and, for the most part it was fine, but there were some apps that seemed to start causing problems with the machine.

Now I just keep it on a seperate HDD that isn't used by the OS or apps and everything is as fast as when I ran with no page file at all.
 
I recomend disc encryption if they are that security conscious :P ...

Exactly, i work in an industry that puts information security at the heart of everything we do, and the swap file is enabled on every single one of our systems.

We do encrypt laptop hardisks, tapes, every network connection, disable USB, disable wireless, have no wireless networks anywhere etc etc.

I have never heard of people disabling the swap files for security reasons...
 
I recomend disc encryption if they are that security conscious :P ...
They do that too, so you can put that tongue away LOL... it's electronic banking. Never underestimate how paranoid a company can be when they have hundreds of billions of pounds to protect. :)
 
They do that too, so you can put that tongue away LOL... it's electronic banking. Never underestimate how paranoid a company can be when they have hundreds of billions of pounds to protect. :)

Work in similar industry...never heard of the swapfile thing.

Excactly what protection is this ? If someone can read memory, they can read it regardless of whether its paged or not....i don't see the point.
 
I know what you mean: a lot of what is done is overkill and I myself don't always see the point...

As it was explained to me the reasoning was something to do with the longevity of data on HDD as opposed to RAM: data on a hard disk, such as stuff that somehow got left behind by a swapfile (even tho in theory this should never happen from a secure program) is more likely to remain on the disk, and it may be possible for a subsequent different authorised user to recover data from a previous session. But yeah there would have to be some really sloppy coding or a crash or something for that to happen since any secure data should be wiped by whatever program used it.

As I said I don't always see the point of some of the security policies, but I have occasionally noticed XP machines with swapfile disabled being a bit more responsive than those without - and like most people here I'm always interested in anything that might give a little more performance, so I wondered if it might help with Win7, and if so, how much RAM would be needed. :)
 
Last edited:
Well after going through many many mags of custom pc I finally found the article
about the swapfile, and it is on PCFormat Not CustomPC! (PCF Issue 230 Sep 2009 page 54 - 59)

To make a long article short - it basically shows that a small constant page file is fastest and optimal for windows vista 64.

I have also ran 3dm06 with a constant swap file on a ram disk and on a separate partition, with only 41 3d marks more to the swap file on ram disk configuration. Nothing to be excited about.

I thought the original post is mainly in concern with the performance of the pc with regard to what swap file configuration you would use isnt it? coz if its about the security then one could understand the importance of encrypting and/or disabling the swap file.
 
What happens when the ram is full though, does the system dump older data from RAM to make room for new data? that could cause problems.

What happens is generally that the program which requires more memory crashes. Not pretty, and why disabling the swapfile is generally a bad idea.
 
Weird, wonder what makes people think you can't run a stable system without swap?

A system can run fine without a paging file providing the amount of system committed virtual memory your workload requires does not exceed the amount of physical memory of the system. However, there are a couple of disadvantages with doing so.

But windows does seem to mess about writing to swap even when ram is not full, hence the slight performance boost if you can prevent this altogether.

Of course, that's the function of the paging file. There seems to be this myth that the paging file is only there to accommodate the user when they have exhausted their physical memory capacity, which isn't correct. By having a paging file, the system can write pages on the modified page list, which represent pages which have been taken out of a process working set because they aren't being accessed actively but have not yet been saved to disk, out to the paging file. This then results in that memory being available for other purposes, such as caching.

Also, something which is important to take into account is that when pages have been written to the paging file and the data has been saved, the pages are moved to the standby page list where it can be soft page faulted back into the process working set. A process will only need to read from the paging file if the memory manager gives the page which belonged to the original process to someone else. If it gets to that point, the fact that it has to read it's data back in from disk is going to cause a negligible impact on system performance. You can find out more information about the paging lists and what goes where and when here.

If there is no paging file, private modified pages would have to be backed by physical memory. Forcing data which isn't being accessed actively to occupy space in memory isn't a particularly intelligent thing to do. The system also won't be able to generate crash dump files without a paging file. Assuming you are happy with those two disadvantages, you also have to take into account whether your workload requires a paging file or not. If your workload requires more system committed virtual memory than the amount of physical memory you have in your machine, and you disable the paging file, you will run into problems which I demonstrated this in this thread here - post 35.

If we assume you are going to have a paging file, when it comes to what sort of size you need, there is no single answer because it will depend on your workload. If you are not interested in monitoring how much system commit your workload requires, letting Windows manage the paging file size should be sufficient. If you are looking to size the paging file yourself though, have a read of this paper here.
 
Back
Top Bottom