PDA

View Full Version : Moving the swap file


granny
01-21-2003, 04:47 PM
I have just finished building my own computer and after struggling for several days trying to install Windows 98 on it, I think I have finally a working system. :)

Now, I am trying to move the swap file to its own virtual disk, which I set especially for that. It is disk D and it is 2 Gig in size.

Usual sequence "System Properties", "Performance", click on "Virtual Memory", then "Let me specify my own virtual memory settings".

I am given the choice of all the logical drives I have set up. D of course is given as having 1992MB free. I want to use just a little less than the whole disk, just to be on the safe side, so I set minimum and maximum both at 1980MB, click OK and yes to the warning.

Then, lo and behold, if I look again at the virtual memory window, it is telling me that drive D has 3972MB of free memory!!! It has added the real free space I have on that disk to the amound of virtual memory I specified (1992 + 1980)! Yet I checked the disk's properties and it still stands at 1992 MB in size. (It does the same thing to no matter which logical disk I specify.)

Does anyone know what is happening here? Is this likely to cause some problems? If so, how do I correct that?

Thanks!

Louise

ski
01-22-2003, 10:36 AM
Set the swap file min/max size at 900MB.
If its still added to the free space, then reduce the size in small increments until it's not added to the free space.

Sylvander
01-22-2003, 11:01 AM
It's usually advised to make the swap file 2.5 times the RAM size.

That's what mine is set at and I've never suspected it of running out of room.

Way back I had it set to less and Windows complained when the swap file ran out of space so I just kept increasing it.

I eventually settled on 250% or 2.5 times RAM and that's been ok.

granny
02-01-2003, 09:23 PM
Ok. It took me some time to get back into this, but I tried the different things that were suggested, and I still have the same problem.

I found that whatever I set as a minimum for the swap file is what is added to the size of the hard drive (virtual) that I have. So if I put 0, then the size of the HD is left as it is supposed to be. Again, I point out that the size is changed only in the "virtual memory" window. The actual size of the drive remains the same on the drive "Properties".

I read that it is best to set the minimum and maximum at the same value. Not sure why it't best, but that's what I was trying to to.

Also, someone recommended somewhere (can't remember where) to set the swap file size at at least five times the size of the RAM, and in fact, the size of the RAM you want to eventually install on your computer. Since the size of my RAM is 256 at the moment, but I intend to install more RAM (probably another 512) when the price gets a little more reasonnable, I thought that 2 Gig was a fair compromise.

Anyway, that still doesn't solve the problem of the balooning Hard Drive. Any thought?

Louise

ski
02-01-2003, 11:23 PM
Depending on how you use your computer, your swap file may not even come into use with 256MB of RAM.
For example, if you do not run any memory hogging applications, like graphic design, video editing, or intensive games, then the amount of unused physical memory should always exceed the minimum required to prevent the activation of the swap file. And increasing the amount of installed RAM to 2GB will help matters even more.
This of course assumes that your system does not have any 'memory leaks'.

A good way to check this is to restart the computer, open Systen Monitor, enable 'Unused Physical Memory' and 'Swap File In Use', note the initial values for each(SFIU should be zero), minimize SM to the taskbar, and run your system as you normally do.
Then, close all programs, and check SM to see what's happening with UPM and SFIU.
If UPM returns to or close to the initial amount noted above and the SFIU stayed at zero, then you need not be concerned about the swap file.
However, if the UPM is far below the initial amount even after closing all programs and the swap file came into use, then you have a memory leak. This will require either frequent restarting to restore the UPM, or reinstalling programs which are suspected of causing the leak.

ski
02-01-2003, 11:25 PM
My thick fingers were supposed to have typed 'System Monitor' in my last post.

Paul Komski
02-02-2003, 04:35 PM
I agree with ski, that the sensible approach is to first monitor usage and then adjust the settings appropriate to your needs.

People have all sorts of "formulae" for the correct amount of virtual memory, without a rationale of why. You will need 'significantly' more than RAM, if you need to have somewhere to store a RAM dump in the event of a crash. If you don't know what a RAM dump is then you don't need to be able to read/debug one; IMHO. Not even sure if Win9x creates one by default.

Modern pc's with a lot of RAM probably seldom access virtual memory at all. Having some, just decreases the likelihood of running-out of memory if your memory usage becomes very large for some reason or another.

If fixed size (min=max) then defragmentaion of that drive is reduced but there is little to be gained by moving it to another partition, unless that partition is on a separate physical drive.

If you have some special reason for moving the swapfile then fine; there's a lot to be said for just letting windows manage it; or just changing it to a fixed size on the default drive.