swap file

Hungfoo

Gawd
Joined
Mar 30, 2001
Messages
538
How do you make a swap file partition? Also, any other tips for optimizing performance on a win xp system is much appreciated. I have 2 120 gig drives and they are quite full now and even tho i defrag regularly, and provide ample space on the c drive for virtual memory, it has become insanely sluggish. a large problem i think is the fact that the drives have only 2 mb cache.
 
Well first, you need to make a partition that's somewhere around the size of the maximum file size that you will specify. Got the partition?

Okay. Go to System Properties -> Advanced -> Performance Settings -> Advanced -> Virtual Memory. Click Change. You should disable the swap file on the C drive and remember to click Set. Then select your page file partition. Click the Custom Size radio button, and specify a minimum and maximum size. Remember to click Set.

Restart.

Done.
 
i dont actually have the partition so id have to erase the drive to make one right?

also, i have 512 mem so 768 would be my ideal swap file size? so for a partition i could leave like 3-4 gigs and have plenty of space should i decide to upgrade later?
 
Alright, what you first need to understand is exactly why you're doing this. Doing this to set a limit on how much virtual memory Windows can use is not why you do this. That just causes messages to pop up every once in a while, bitching to you about low levels of virtual memory. What you ARE doing this for is to prevent file fragmentation. That being said, there are two kinds of file fragmentation: internal and external. Internal fragmentation refers to the loss of disk space when a file does not completely fill a whole block/sector/whatever on the hard drive. External fragmentation refers to the separation of a file into multple regions of contiguous blocks on the hard drive. Not having a file in a single contiguous block can cause slow reads from the hard drive. Making a page file partition addresses the latter case of fragmenation. It reduces this by removing a very large file from your main parition which has the potential to expand and contract in a such a way that it causes this external fragmenation by reducing the number of contiguous blocks of free space on the hard drive. Get it? That being said, VM usage may seem ridiculous, but just give Windows what it wants. 1GB should be enough, maybe 1.5GB or even 2GB. I have 1GB of RAM (speaking of which, I need to update that profile), and I use a 1GB page file. I still get Virtual Memory low warnings every once in a while. You decide.

And yes, using fdisk you will have to destroy your current partition if there is no unparitioned space on your disk. Or you can can get non distructive partition software. Partition Magic is usually recommended, although I've never used it.
 
thx for all ur help. i guess i cuold use partition magic to create a sub partition out of the c drive but in the future id like to create one and somehow insure that its close to the physical center of the drive for faster access times. not sure how to do that tho it seems to me that it works from inside out so that drive c is typically the closest, then d, e, etc. so im wondering, since windows needs drive c to boot from, how to get the swap file partition in front of it.
 
i'm not sure if it was said, i just woke up :), but it helps to have the min and max size the same so that the pagefile doesn't change size and fragment anything
 
***my usualy rant on PFs***

*For XP and 2K only*

This has been discussed a lot around here and no one agrees. The bigest argument has to do with disabling the page file when you have a lot of RAM, I won't bother discussing disabling the PF unless someone really wants me to go there. So below is a copy and paste minus the no PF option. It's a pretty solid method.

Open Task manager and go to the performance tab. The Commit Charge section what we are interested in. The Total is the amt of memory usage now. The Limit is the total amt of RAM + Page File. Peak is the highest total for this session (since login).

OK, note the Peak (since your machine has likely been running for a while you probably have a decent Peak), and and give you system a workout. Load up as many programs as you run at once. Open large files in any applications with the expected number of apps open. If you work in Photoshop or and DBs open large files there. OK, so after it's been through the ringer and you have stressed the system as much as you expect you should have generated a good 'Peak', the most memory your machine will need.

Now take Peak - RAM and you know how much page file you need. Of course your don't want to max out so give it breathing room. If the number turns out to be ~500 set it to ~600. Set the min and max the same to prevent page file fragmentation. You want the smallest file possible, as smaller files take less time to access.

Here is a link with a prior discussion on this, http://www.hardforum.com/showthread.php?s=&threadid=707368&perpage=20&pagenumber=1
 
Back
Top