Possibly stupid question about Windows XP paging/swap files

For general computer discussion & help, come here

Moderators: Bakhtosh, EvilHomer3k

Post Reply
User avatar
Freezer-TPF-
Posts: 12698
Joined: Wed Oct 13, 2004 2:41 pm
Location: VA

Possibly stupid question about Windows XP paging/swap files

Post by Freezer-TPF- »

My system runs Windows XP Home and has two 80GB hard drives. The first physical HD is partitioned into C: (O/S and non-game apps) and D: (games!). The second physical HD is just one big E: and is used mostly for data storage/backups but I have started to put some games on there too (Hi Steam!) since space was running a little low on D:.

I haven't ever futzed with my Windows swap file, so it was just set up automatically on C: when I installed XP. Now, if I install games or other apps on E:, do I need to set the E: to have its own swap file (on E) or do the apps installed on E: just use the swap file that was automatically set up on C: when I installed XP? I added the second HD later, months after I installed XP.

Like I said, this is probaby a dumb question but for some reason it is bugging me. Thanks for any insight.
When the sun goes out, we'll have eight minutes to live.
User avatar
ChrisGwinn
Posts: 10396
Joined: Wed Oct 13, 2004 7:23 pm
Location: Rake Trinket
Contact:

Post by ChrisGwinn »

No. You don't need to change anything.

The page file/swap file/virtual memory (call it what you will) is a way to have more addressable memory than the amount of RAM you have in your machine. It's not a per-app thing.

Modern computers have tiers of memory, with each tier being bigger and slower than the tier above it. So you have a small amount of very fast memory in your processors cache, then a larger pool of fairly fast memory in your RAM, then a big amount of very slow memory paged to your hard drive.

If you want an example of virtual memory in action, load a lot of programs and minimize one. Then do a lot of memory intensive tasks with the other programs. Then notice that it takes a long time to switch back to the minimized program, and your HD light is flashing? That's because the OS has to take that data off your HD and put it back into the system RAM.
Coskesh
Posts: 598
Joined: Tue Oct 12, 2004 11:14 pm
Location: San Diego, CA

Post by Coskesh »

Well, if your 2 drives are running off of 2 seperate controllers, I've always understood that you could get slight performance increases by putting your swap file on a seperate drive than the drive that has your system files.

You will need to leave about a gig or so (depending on amount of RAM) of swap file on your system partition if you want XP to be able to do a memory dump when it blue screens. Least that was the case with 2000/NT.

Otherwise, no need to move around your swap drive because the games are located on a different drive or partition.
User avatar
Freezer-TPF-
Posts: 12698
Joined: Wed Oct 13, 2004 2:41 pm
Location: VA

Post by Freezer-TPF- »

Thanks for the replies. That makes sense that the swap file doesn't have to be on the same drive as the app, especially now that you reminded me that some performance tweakers recommend putting the swap file on a separate channel. It didn't occur to me that that little tip kind of answers the question. :)
When the sun goes out, we'll have eight minutes to live.
User avatar
ChrisGwinn
Posts: 10396
Joined: Wed Oct 13, 2004 7:23 pm
Location: Rake Trinket
Contact:

Post by ChrisGwinn »

You can get a performance boost from running the swap file off a different channel than the one you're doing most of your access from, if you're doing memory paging. But he's using his second drive for games, which are going to be doing a fair amount of I/O on their own. So moving the swap file to the second drive could actually hurt him, even if it's on a second channel. They're easy enough to move though, so you could try it both ways and see how it works.
User avatar
gbasden
Posts: 7672
Joined: Wed Oct 13, 2004 1:57 am
Location: Sacramento, CA

Post by gbasden »

Two performance tips, though.

1) The paging file should be roughly 1.5 times your physical RAM

2) Always use a static page file. IE, when it asks you how big to make it, type 2048 into both boxes. If you leave it at the default (normally a lower limit of like 1024 and an upper of 3064) the page file will grow and shrink dynamically, causing fragmentation and slowdowns.
Post Reply