• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

How to keep swap file from moving?

Culvin

Member
I'm using WinXP SP2 and I've tried setting the swap file to a static size by setting the min and max values equal, but occasionally the swap file will move positions on my HD anyway. This is especially annoying because for some reason my computer will either lock up or reboot when this happens.

I'm running nothing in the background other than a lightweight firewall and AV. This has happened to me through multiple formats now. Any input would be appreciated.
 
ummm....stop doing that? If you were to search through the forum, you'd find that the general consensus (amongst lots of flaming) is to set the swap to automatic (on the drives you want) and then LEAVE IT ALONE.

That aside...I've never run into the problem you describe, and I used static on my xp workstations for quite some time. (and on 2K and NT and on servers).
 
I agree that all the flaming on other threads is not needed. If you need a set size then defrag that hard drive right after a reboot. Reboot again to make sure.

I finally gave in to peer pressure. While setting up WinXP on a new machine I made three partitions on the main drive. One just for the OS. One just for the swap (way more than I needed, but just in case). One last big partition for all the program installs.

Have never had any problems with this setup. If you have a free IDE channel you could even experiment with a small hard drive dedicated to swapping. I would like to try this with one of my open SATA channels some day.
 
One just for the swap (way more than I needed, but just in case). One last big partition for all the program installs.

Thus insuring the heads are never near the swap file (or program data) at the same time and increasing the thrashing your drive has to do.

This is especially annoying because for some reason my computer will either lock up or reboot when this happens.

If this is true, then something else is wrong with your system. I'd start looking at other causes than the swap file.


 
Woodie, I have searched through the forums and do understand what the general consensus is on swap file settings. I'm asking this question because for some reason I can't figure out, my computer will crash when Windows moves my swap file to another position on my HD. I've tried setting the swap file to a static size to correct this problem, but Windows will still occasionally move it.

Now that I think about it, what I notice is that if my system hangs or reboots (this doesn't happen often), I'll run a defrag and notice that my swap file has been moved. Maybe I'm reading this wrong, and the swap file being moved isn't the cause of the problem but the effect instead... If a system crashes, will Windows move the swap file even if it's a static size?
 
How are you determining that it is being moved?

Is it beeing moved between partitions? or just to a different physical location on the disc (or both)?

Try running a chkdsk ?
 
Originally posted by: Culvin
Woodie, I have searched through the forums and do understand what the general consensus is on swap file settings. I'm asking this question because for some reason I can't figure out, my computer will crash when Windows moves my swap file to another position on my HD. I've tried setting the swap file to a static size to correct this problem, but Windows will still occasionally move it.

Now that I think about it, what I notice is that if my system hangs or reboots (this doesn't happen often), I'll run a defrag and notice that my swap file has been movied. Maybe I'm reading this wrong, and the swap file being moved isn't the cause of the problem but the effect instead... If a system crashes, will Windows move the swap file even if it's a static size?

Is there any evidence the two events are related?
 
I manually defrag quite often -- usually every day when my computer isn't busy with something else. My swap file will always be in the same position until after a crash, then it will be somewhere else.

I didn't set up different partitions last format, so it's being moved on the same disk/partition.

I chkdsk /F every week or so, but that hasn't helped. I haven't used chkdsk to check for surface errors though.
 
I put mine on my first partition FAT32 (2gb) 1.8gb swap size. 50mb/50mb on c drive just in case.

Works fine for me although you need partition magic or similar to do that after everything is installed. no thrashing and no moving around.

I wouldnt suggest auto if you play newer games that require huge swap files. Waiting a few minutes for a game to load just to crash to desktop that there is insufficent virtmem is annoying.
 
The way the OP is describing this..the system freezes/crashes... and after reboot, he notices the swap file has moved.

This sounds very much life the effect (not the cause)...probably because Windows uses the swapfile to create the memory dump (or minidump). As bsobel suggests, the cause of the system instability is more likely to be elsewhere.
 
Originally posted by: RelaxTheMind
I put mine on my first partition FAT32 (2gb) 1.8gb swap size. 50mb/50mb on c drive just in case.

Works fine for me although you need partition magic or similar to do that after everything is installed. no thrashing and no moving around.

I wouldnt suggest auto if you play newer games that require huge swap files. Waiting a few minutes for a game to load just to crash to desktop that there is insufficent virtmem is annoying.

You mean not enough PHYSICAL RAM.
 
Do a surface scan.
If you have bad sectors that are empty, but will occasionally fill up with swap/temp space, this might crash stuff, including the OS itself.
 
Originally posted by: rbrandon
Originally posted by: RelaxTheMind
I put mine on my first partition FAT32 (2gb) 1.8gb swap size. 50mb/50mb on c drive just in case.

Works fine for me although you need partition magic or similar to do that after everything is installed. no thrashing and no moving around.

I wouldnt suggest auto if you play newer games that require huge swap files. Waiting a few minutes for a game to load just to crash to desktop that there is insufficent virtmem is annoying.

You mean not enough PHYSICAL RAM.


no VIRTUAL MEM. heh. try playing hl2 or similar with 1gb ram and only a 500mb page file. it would crash to desktop because there isnt a big enough page file. aka virtual mem.

this has been repeated many times on many forums. just because you have 1gb+ amounts of RAM doesnt mean you can cripple the page file/virtual mem.
 
Originally posted by: RelaxTheMind
Originally posted by: rbrandon
Originally posted by: RelaxTheMind
I put mine on my first partition FAT32 (2gb) 1.8gb swap size. 50mb/50mb on c drive just in case.

Works fine for me although you need partition magic or similar to do that after everything is installed. no thrashing and no moving around.

I wouldnt suggest auto if you play newer games that require huge swap files. Waiting a few minutes for a game to load just to crash to desktop that there is insufficent virtmem is annoying.

You mean not enough PHYSICAL RAM.


no VIRTUAL MEM. heh. try playing hl2 or similar with 1gb ram and only a 500mb page file. it would crash to desktop because there isnt a big enough page file. aka virtual mem.

this has been repeated many times on many forums. just because you have 1gb+ amounts of RAM doesnt mean you can cripple the page file/virtual mem.




Exactly. I have 1GB ram, and i let windows manage my swap file. works fine. btw, page file and ram are 2 different things, but thats a flame war and discussion for another day.
 
Originally posted by: Culvin
I manually defrag quite often -- usually every day when my computer isn't busy with something else. My swap file will always be in the same position until after a crash, then it will be somewhere else.
Well, yes. You are obviously encountering filesystem corruption on your OS/pagefile drive, such that the OS is re-creating a new pagefile when it boots, and it ends up getting allocated to different sectors on disk. NT-based OSes, with a base fixed-size pagefile, do NOT move it around. It can grow, but the "grown" part is almost effectively treated like a second pagefile, and is automatically shrunk back down (effectively deleted) when you shut down the OS.

Originally posted by: Culvin
I chkdsk /F every week or so, but that hasn't helped. I haven't used chkdsk to check for surface errors though.
Better yet, use the mfg's bootable diagnostic floppy/CD tool, you may well be having HD errors.

 
Originally posted by: RelaxTheMind
Originally posted by: rbrandon
Originally posted by: RelaxTheMind
I put mine on my first partition FAT32 (2gb) 1.8gb swap size. 50mb/50mb on c drive just in case.

Works fine for me although you need partition magic or similar to do that after everything is installed. no thrashing and no moving around.

I wouldnt suggest auto if you play newer games that require huge swap files. Waiting a few minutes for a game to load just to crash to desktop that there is insufficent virtmem is annoying.

You mean not enough PHYSICAL RAM.


no VIRTUAL MEM. heh. try playing hl2 or similar with 1gb ram and only a 500mb page file. it would crash to desktop because there isnt a big enough page file. aka virtual mem.

this has been repeated many times on many forums. just because you have 1gb+ amounts of RAM doesnt mean you can cripple the page file/virtual mem.

pagefile and virtual memory are two different things...
 
Originally posted by: KoolDrew
Originally posted by: RelaxTheMind
Originally posted by: rbrandon
Originally posted by: RelaxTheMind
I put mine on my first partition FAT32 (2gb) 1.8gb swap size. 50mb/50mb on c drive just in case.

Works fine for me although you need partition magic or similar to do that after everything is installed. no thrashing and no moving around.

I wouldnt suggest auto if you play newer games that require huge swap files. Waiting a few minutes for a game to load just to crash to desktop that there is insufficent virtmem is annoying.

You mean not enough PHYSICAL RAM.


no VIRTUAL MEM. heh. try playing hl2 or similar with 1gb ram and only a 500mb page file. it would crash to desktop because there isnt a big enough page file. aka virtual mem.

this has been repeated many times on many forums. just because you have 1gb+ amounts of RAM doesnt mean you can cripple the page file/virtual mem.

pagefile and virtual memory are two different things...

noted... virt mem is stored in page files...
 
I will probably get flamed for this if anyone is still reading.

I happen to run HL2 with one gig of RAM and a 256MB swap file. It runs fine with no crashes (since the most recent update).
The game doesnt need 2GB of total memory in a single instant, so my setup works great.
Same for Doom 3 and FarCry.
 
Back
Top