cancel
Showing results for 
Search instead for 
Did you mean: 

Virtual Memory set-up

Community Veteran
Posts: 7,183
Thanks: 56
Fixes: 2
Registered: 30-08-2007

Virtual Memory set-up

There are a number of things that Windows doesn't do very well (really!! who's counting?) one of them is efficient use of virtual memory.

virtual memory is normally set automatically by Windows, but is very often too conservative with the paging file size set far too high, the file size can be set by the user to a much more efficient level, in the process producing a decent increase in the performance of your PC.

There was/is a rule of thumb, which I think was 2.5 times the installed RAM i.e in my case with 256Mb RAM, the virtual memory page size was reduced from a whoping 1100ishMb to a much better 630Mb.

BUT: it's a long time since I did this, and my settings have long since gone with numerous re-loads of Windows, and I've forgotten what it was.

Can any of you guy's out there either confirm my theory or remind me what the formula really is.

If you're interested in this setting, right click "my computer" and click "performance", different versions of Windows find it slightly different ways but all start with "my computer" right clicked (or "system" in the control panel if you prefer that route)
Experience; is something you gain, just after you needed it most.

When faced with two choices, simply toss a coin. It works not because it settles the question for you. But because in that brief moment while the coin is in the air. You suddenly know what you are hoping for.
5 REPLIES
N/A

Virtual Memory set-up

A rule of thumb is anything between the amount of installed ram, to 2.5 times the installed ram (as you sugested).

A good all around setting though, it 2 times your ram.

The only performance hit you see by letting windows manage it, is that the data is scattered right accross the file it creates. Just the same was a HD becomes fragmented, the data it needs to access can become fragmented.

It is the random fetching process that hits performance.

In adition, because it is a file, sorted on your normal windows partition, it is subject to standard file fragmentation that defrag fixes.

Linux uses a 100% seperate partition, set to the size you wish as this swap disk. That way it can get as messy as you like, and you simply change the partition size and a entry in a text file to change it.

It isn't the pagefile managment that causes this insane filesize. More Windows internal memory functions, at there usual game.

Many people may see what they think is a memory leak in there software. ie, where memory in use by a program is building up and up, but never gets released without closing.

In most cases, there is no leak, and the memory is free.

However, instead of returning this memory right away, windows hold onto it until the last possible second.

In pagefile terms, this means until the page file is full, and it then needs that part again.

So yes, managing the pagefile manaualy is the best way, but you can also see performance hits, even when using a quality setting for this.
N/A

Virtual Memory set-up

so does that mean that with my 512mb ram i should have my pagefile at 1024mb? and when i get round to doubling that to 1024MB ram i should increase my pagefile to 2GB? sounds a bit extreme to me...
Windows (XP) currently has my pagefile set at 1250mb so that's on the upper limit of the 2.5 times ram. may decrease that a tiny bit....
Community Veteran
Posts: 3,789
Registered: 08-06-2007

Virtual Memory set-up

My rule of thumb is usually 2x available ram. However, as I build more and more machines with enormous amounts of RAM, I'm starting to be tempted to turn it off completely.

Before you all flame about it, I've actually been running my laptop with 1GBmem/Win2k for about 9 months with NO swap file configured at all. I do development in vs.net (memory hog!) and only once have I ever pushed it to the limit on memory, at which point Win2k moaned a bit and asked me to close down some apps.

Of course, turning off the swap file gave me room for the 1GB hibernate file. If only win2k would boot 'normally' in under 15 minutes.

Barry
N/A

Virtual Memory set-up

When you are using larger amounts of memory in your system, you can do your own diagnostics, to see how larger page file you could have.

While you can quite easily have no page file at all, it's not all that advisable. Pagefiles are very usfull.

Laptops, while you could class them upto the desktop market at this time, can benefit from no pagefile.

Minimising the HD writes on the laptop will keep the speed up, and you will very realy need to overload what you have open on one.

People will use a desktop to multitask more than laptops. When you switch to another application, the old one can go to the pagefile, leaving more physical RAM for the open program.

Pagefiles are a must for gamers. Without it, un-needed tasks will have no choice but to remain on the ram, while maps and randers will all have to be built from the disk, rather than being kept in ram.

Anyhow, to do you own diagnostics, you need to make sure you have the system monitor tools installed.

Setup the graphs to plot the pagefile allocation.

You are best to tell it to open on statup then reboot your computer (a launch icon in the statup folder). That way you can see as much uage as possible.

You can usualy get a good guide on how much you feel windows should have access to.
gosforth
Grafter
Posts: 109
Registered: 11-10-2007

Virtual Memory set-up

Coming from UNIX backgroung I have set up a separate partition for the paging file and have fixed its size. This helps reduce fragmentation on your system disk. I was also having problems with some the paging file being on a dodgy bit of disk. If necessary I can now reformat my 'swap' partition in the knowledge that I am not going to lose anything.

I also came accross a nice utility called mpower which defragments your memory (www.mindbeat.com). I also have a program that defragments the system files on startup (www.sysinternals.com).

Chris