How to optimise your Windows swap file

We finally come to that scenario we've seen a lot of people with a sizeable compliment of RAM touting: turning off virtual memory and doing away with a page file. What we would like to know is just how good a thing it is!

To answer these final questions we took a high-memory system that involved installing 6GB of memory into our 64-bit test system. Clearly the fastest scenario will be running without any page file at all, right?

It appears not. By accident we actually left the page file on and ran the benchmark cycle. Spotting our mistake we reran the test with the page file off, to discover it was slower. Only slightly slower, but still slower.


NO PAGEFILE: Here we see PCMark giving up when the page file is turned off

Either way the results are still staggering in terms of the speed increase over any dependency on using the page file, it's a ten-fold reduction in wait times and a 40-fold increase in throughput over even the solid state drives, never mind the 100-fold plus increase in throughput over the spinning disks.

Again, more from interest than any practical solution we created a 5GB RAM drive and created a fixed page file within this to see what type of overhead that would impose.

It pretty much halved the throughput speed showing there is something of an overhead involved with simply running the page file, but in context of the slow drives it's normally stored on that's not usually an issue. So what have we learnt?


PAGEFILE: The best way to store your page file is in a single defragmented state

Clearly having lots of memory is a great thing, if you can eliminate the need for Windows to use the page file your life is going to be much improved.

Having no page file, while it might seem clever on the face of it could slow things down ever so slightly and if you do ever hit a low-memory situation it's going to cause problems. The page file is also used as a dump area if a crash occurs, turning it off eliminates that feature.

We can see anyone with a solid state drive is going to be fine either with a managed or fixed page file.

For the rest of us the best solution is to opt for a user-fixed page file and as many people more than likely have a second drive, choose to store two user-fixed page files on both drives. If swapping does occur at least this should keep times to a minimum.


Click here for the full res version