Wednesday, October 15, 2008

Windows Vista/XP Page File (Swap File)

So you want to boost performance huh?
Well, one of my tricks over the years has always been to move the page or swap file onto a drive that isn't used much. For my desktop it happens to be a fairly decent size partition that I cut out of the linux drive. Now when I say partition I mean a division of the drives, when I say a drive, I'm usually talking about a Hard Drive.

What is a page/swap file?
A page file is simply a set of steps that are backed up onto the hard drive to help increase performace of your ram. It even acts as ram in some cases. if you have 10 steps lined up and your ram only allows 8 then about 6 of them will be in the ram and the other four will be in the page file. The page file will then be used with the other 2 parts allowed. Do more research if I'm not explaining it well enough.

Why can't I just use a partition?
You can but it isn't worth it. Think of your hard drive like a record, your needle does both the reading and the writing. Now picture that your partitions are about half the record inwards for the first one and the outside of the record for the second one. You put your partition for the page file on the outside (you really don't get to choose unless you get really techy) Your normal drive partition is on the inside. Alright, so your ready to start doing things. You start a few programs and the needle reads from the inside then has to write to your swap/page file so it moves to the outside.. back and fourth back and fourth. Now lets pretend this is any moving thing in the world, what is going to happen? I hope you guessed it, it's going to wear out, effectively reduce your computer speed, and cause your hard drive to disembark on it's journey prematurely. So you need 2 hard drives to increase performance this way, and you want your page file on the one you use the least.

Is partitioning it best?
I feel it's important to partition out the page/swap file. It helps to limit, and ensure space for the file. I recommend partitioning out the same amount of space for your page/swap file that you have in RAM rounded up. So if you have about 4 gigs of RAM then I'd partition about 5 gigs on average. This gives plenty of room. However if you choose to limit the page file then do so with more research.

Alright, what do I do?

Remember to partition your hard drive ahead of time. You can do this with the system tools. This will be it's own topic soon.


For Vista:
Start->Settings->Control Panel
Double Click System
Click Advanced Tab then on Settings Button under Performance
Click on Advanced Tab then Change Button under Virtual Memory
Select Drive you wish to have the page file on.
Change Settings to liking and click Set
Restart Your Computer

For XP:
Start->Settings->Control Panel
Double Click System
Click Advanced Tab
Click Settings under Performance
In the Performance Options Click the Advanced Tab
Click Change Under Virtual memory
Click the drive you wish to have the page file on
Set the amount of space, or allow the System Managed Size or No page file radio option to be selected.
Click Set
Restart Your Computer

1 comment:

Diego said...

Well done, simple and clear concepts, very helpful.

Thanks for the article.