PDA

View Full Version : Swap File


risk_reversal
07-14-2011, 09:07 AM
A (hopefully) quick question please.

I upgraded the memory on a laptop running XP from 1GB to 2GB. All is working fine (ran memtest86+ for 24hrs no errors).

My question relates to the swapfile. When the laptop was running 1GB (old ram amount), the swapfile settings were set on Custom with parameters 1.5x and 3x (so initial size 1524MB / max 3048MB)

When I increased the ram to 2GB (2x 1GB modules). XP correctly detects everything but the old swapfile parameters remain (as detailed above).

If I go into XP's Virtual memory settings, it says Recommended 3055MB - Currently Allocated 1524MB

I have been searching the net and seems that above 1GB ram some users are suggesting fixing the min/max parameters of the swap file to 1x/1.5x respectively ie 2048mb/3072mb. I think that having max swapfile set at 3x ie 6GB maybe overkill on this laptop.

Any ideas here as to what to do ie leave unchanged or change to ??

Any info much appreciated.

Cheers

azzey
07-14-2011, 11:03 AM
I usually either tell Windows to manage it itself, or set it to 1024MB on the data partition. Running XP with 2GB of RAM should never really have to use the swap file much anyway.

Congrats on your 512th post :D

mjc
07-14-2011, 04:52 PM
I used to 'fix' the swap at 512 MB back when I ran XP (with 512 MB of RAM)...and seldom, if ever, needed it. Yes, 6 GB is MORE than overkill. But then again on 1 TB drives, what's 6 G?

Basically, I look at the drive size, if the laptop has a less than 250 GB hard drive and 1 or more GB of RAM a smaller swap file makes more sense. Remember, not only are you taking up space with the swap file, but you are also going to be allocating as much space as you have RAM for a hib file (hibernation). Between the two of them, they can eat up a lot of drive space...but if you have a bigger drive (100 to 250 GB+++) it doesn't really matter all that much.

Paul Komski
07-14-2011, 10:40 PM
The MS recommended value is based on 1.5 times the installed RAM and this amount is only necessary in order to be able to dump all the memory for debugging in the case of a system crash. I have no expectation of ever wanting to do any such debugging so with 2GB RAM on a normal WinXP installation I personally run things with none or with a minimalist 2MB pagefile. I have been doing this for nigh on a decade with no problems whatsoever. Having the min and the max the same is recommended by some because it lessens the likelihood of fragmenting the volume.

risk_reversal
07-15-2011, 04:00 AM
Most kind guys.

The HD in question is only 120gb but is partitioned so that the swapfile is on only a 30gb XP (primary & active) partition.

I will play around with the settings on the basis which you have suggested.

Cheers

FrankSG
07-15-2011, 03:07 PM
The MS recommended value is based on 1.5 times the installed RAM and this amount is only necessary in order to be able to dump all the memory for debugging in the case of a system crash. I have no expectation of ever wanting to do any such debugging so with 2GB RAM on a normal WinXP installation I personally run things with none or with a minimalist 2MB pagefile. I have been doing this for nigh on a decade with no problems whatsoever. Having the min and the max the same is recommended by some because it lessens the likelihood of fragmenting the volume.

Something that I have never been able to understand is that the recommend size of the swap file/page file is based on a factor which is 1.5 times the size of installed RAM. Which is saying that the more RAM you have, the bigger should be the size of the swap file. It seems to make sense to me that the more RAM you have, the less of a swap file you would need. So, I’m sure there is something here that I don’t understand. Incidentally, I have run my computers with no swap file what-so-ever and have had no problems. But others have said, “No—no—no! You must have a swap file!!” So, I’m back to using a swap file. But I have it set so that the maximum and minimum sizes are the same. It is my unprofessional opinion that Microsoft could actually do away with the page file if they wanted to. I'm wondering if the page file is just an old-fashioned idea that once was needed but for the amount of RAM we now have, we could do without it. Having said that, I also admit that there is much that I don't understand.

Sylvander
07-15-2011, 05:22 PM
See above:

The MS recommended value is based on 1.5 times the installed RAM and this amount is only necessary in order to be able to dump all the memory for debugging in the case of a system crash.

FrankSG
07-15-2011, 05:44 PM
Well--it makes sense now. I didn't know exactly what a dump file was so I just looked it up on goggle. I'll keep my page file, but I'll keep it as I currently have it with the maximum and the minimum the same.

Paul Komski
07-15-2011, 10:57 PM
When all the RAM is dumped to the hard drive's page file it makes it available for those that know how to look for the reason behind the system failure. In practice this is practically never done and if one is getting BSODs a domestic system is more likely to simply be reinstalled after the common causes have been eliminated.

A very small minimum nowadays (just a couple of megabytes) is recommended by MS and I believe the reason is that there are still some legacy programs that will abreact in the absence of any virtual memory. We perhaps need to remind ourselves that such VM first came into the DOS/Windows environment (when it was called a swap file) in the days when all memory was very small and expensive compared to the situation today.

Sylvander
07-16-2011, 01:12 AM
Here in Puppy_Linux = Lupu-525...

With Lupu running almost totally in RAM...

Only about 112MiB of my old 2003 PC's 3x256MB of RAM is in use...
[See screenshot below of the Pwidget item = RAM_bar on desktop]
And no swap file is ever needed or used.

Another not_quite_Puppy_Linux [Pussy_Linux] auto-made a 100MB pupswap.swp file [whether I wanted it or not], and when found by each Puppy it is available for use but never needed.
If ever [when] I give up on Pussy_Linux [it's nowhere near as good as a normal Puppy]...
I'll delete that file.

In Win2000Pro I normally make a fixed-size pagefile.sys [Lupu shows it as 960MB right now] that's big enough to take the dump of my PC's RAM.
Been a long time since there was ever a dump of RAM in Win2000Pro.

FrankSG
07-16-2011, 12:02 PM
Here's what I have done since you have broadened my understanding about the pagfile: I am still keeping the pagefile but I have it set at a fixed size of 200MB. I have also gone into the registry and set it to "Clear pagefile at shutdown." The reason for this is because sometime ago I read from a reliable source (I think it was reliable)that sometimes a corrupt pagefile can cause problems and it would be a good idea to occasionally clear it upon shutdown. The problem was that at that time I kept a very large pagefile and it took too long to shutdown as it had to clear the file. Since I now have the size at 200MB it doesn't take very much longer to shutdown. Now whenever my computer starts up, it will have a fresh pagefile So, I think I'll keep it as is.