Jump to content

Swap File Growth


joe tweaker

Recommended Posts

I'm running fully patched 98SE with 512MB ram, letting windows manage virtual memory, but I moved my swap file to the first partition of my second physical hard drive. For some reason my swap file is constantly growing, and never shrinks. It is now over 1.7 GIGABYTES in size. I'm not running that many programs. I reboot at least once or twice daily. Sometimes much more. I've tried deleting it from DOS and sometimes it will stay at zero for up to a week, and then suddenly its over 1GB and nothing short of deleting it will reduce its size. Why does it grow so large with 512MB of ram installed, and never shrink? I have tried limiting vcache to amounts between 16384 and 128KB (1/4 of ram), but win386.swp seems to keep increasing in size no matter what I do. I have never seen windows shrink this file. Shouldn't windows resize win386.swp to a smaller size when I reboot, or haven't used all my ram? Why does it only keep growing until I intervene and delete it?

Link to comment
Share on other sites


I have my swap file set with a 200MB minimum and no fixed maximum and I don't think I have ever seen it grow bigger than 200MB.

Try setting a minimum value but leave the maximum at its highest (default) setting

Link to comment
Share on other sites

I have no minimum and no maximum setting. It stays at zero until something triggers it.

It is often static many days between growth spurts, but never shrinks. What puzzles me

is why it never shrinks, never gives any space back? I thought it only used hard disk

space until ram was free again? Isn't all ram free again each time I boot?

Link to comment
Share on other sites

I'm running fully patched 98SE with 512MB ram, letting windows manage virtual memory, but I moved my swap file to the first partition of my second physical hard drive. For some reason my swap file is constantly growing, and never shrinks. It is now over 1.7 GIGABYTES in size. I'm not running that many programs. I reboot at least once or twice daily. Sometimes much more. I've tried deleting it from DOS and sometimes it will stay at zero for up to a week, and then suddenly its over 1GB and nothing short of deleting it will reduce its size. Why does it grow so large with 512MB of ram installed, and never shrink? I have tried limiting vcache to amounts between 16384 and 128KB (1/4 of ram), but win386.swp seems to keep increasing in size no matter what I do. I have never seen windows shrink this file. Shouldn't windows resize win386.swp to a smaller size when I reboot, or haven't used all my ram? Why does it only keep growing until I intervene and delete it?

Sometimes you can have a run away swap file, created by programs requesting the allocation of large amounts of memory. The file size is not reflected by how much windows is actually using at that time, windows and programs will probably be only using a fraction of it. With your amount of ram setting ConservativeSwapfileUsage=1 in system.ini will lessen swap file usage and if it is a problem program you will be able to identify it easier by how much ram is being consumed.

Link to comment
Share on other sites

I already have ConservativeSwapfileUsage=1 in System.ini.

I often run nothing but Explorer2 and Eudora at the same time.

These programs shouldn't even be using a fraction of my RAM.

Even if I load up other programs once in a blue moon, shouldn't

windows shrink the swapfile when RAM is available again?

Does windows NEVER decrease the swap file, even if I don't use

all my ram? (I've tried rebooting 3x in a row without loading

ANY programs, yet I've still got a 1.7 GB swap file.)

How would I find out what program is reserving so much ram?

Is Eudora 5.2 known to request more than 512MB?

Link to comment
Share on other sites

I don't think Windows gives back SwapFile Disk space until it starts to run out of Hard Disk space.

But it should reduce next time you restart the computer.

You can use Cacheman 5.50 to monitor your SwapDisk space usage and other RAM resources.

Link to comment
Share on other sites

You must delete it on boot to shrink it I think. You can use wininit.exe and wininit.ini for that.

Create a wininit.ini file in your windows dir and write the following line in it (adjusting the path if necessary of course) :

NULL=C:\Windows\WIN386.SWP

Then wininit.exe should delete it on reboot and windows will create a fresh one of small size.

Mine is of fixed size (500MB) with 1.75GB of RAM (WinME) so it never shrink or grows.

The advantage of using a swap file of fixed size, especially if it is located on the system drive is that it avoids it becoming (heavily) fragmented when it grows and affect performance.

I never found that ConservativeSwapfileUsage=1 was a good setting for optimal performance btw.

Edited by eidenk
Link to comment
Share on other sites

You must delete it on boot to shrink it I think. You can use wininit.exe and wininit.ini for that.

Create a wininit.ini file in your windows dir and write the following line in it (adjusting the path if necessary of course) :

NULL=C:\Windows\WIN386.SWP

Then wininit.exe should delete it on reboot and windows will create a fresh one of small size.

Mine is of fixed size (500MB) with 1.75GB of RAM (WinME) so it never shrink or grows.

The advantage of using a swap file of fixed size, especially if it is located on the system drive is that it avoids it becoming (heavily) fragmented when it grows and affect performance.

I never found that ConservativeSwapfileUsage=1 was a good setting for optimal performance btw.

I go by the information relating to benchmark tests performed MS-MVPs Mike Burgess, Alex Nichol, and other MS-MVP colleagues and my own experience of it over the years. Perhaps as you are using winme your results are consistant with Mike Burgess tests under winme in which no performance difference was noted with or without its use.

@joe tweaker if you have limited your swapfile usage have you also limited your vcache to ensure it cannot increase beyond 512mb, another cause for memory handling problems

Which web browser are you using, reports of firefox using very large amounts of memory prefetching the next 10 googled websites and not clearing its cache abound over the web (300mb consumed in 10 minutes). Hopefully it has been fixed, I do not know I shifted to opera

Edited by oscardog
Link to comment
Share on other sites

I never found that ConservativeSwapfileUsage=1 was a good setting for optimal performance btw.

I go by the information relating to benchmark tests performed MS-MVPs Mike Burgess, Alex Nichol, and other MS-MVP colleagues and my own experience of it over the years. Perhaps as you are using winme your results are consistant with Mike Burgess tests under winme in which no performance difference was noted with or without its use.

On my system using this setting degradates performance badly. Absolute no go. Can't say anything else.

Link to comment
Share on other sites

I don't think Windows gives back SwapFile Disk space until it starts to run out of Hard Disk space. But it should reduce next time you restart the computer. You can use Cacheman 5.50 to monitor your SwapDisk space usage and other RAM resources.

I'd used Cacheman to tweak some settings ages ago, but never noticed it had monitoring abilities (by selecting INFO, then Overview). So I let Cacheman monitor my memory usage all day today. I never once used all my ram, or more than 80MB of my swap file. Despite many reboots, my swap remained at 1.7 gigabytes. So I finally deleted win386.swp, and it has remained at zero ever since! Now I'm certain it knows it is being watched, and it's planning a huge growth spurt the moment I stop watching it! :lol:

Link to comment
Share on other sites

I go by the information relating to benchmark tests performed MS-MVPs Mike Burgess, Alex Nichol, and other MS-MVP colleagues and my own experience of it over the years. Perhaps as you are using winme your results are consistant with Mike Burgess tests under winme in which no performance difference was noted with or without its use.

@joe tweaker if you have limited your swapfile usage have you also limited your vcache to ensure it cannot increase beyond 512mb, another cause for memory handling problems

Which web browser are you using, reports of firefox using very large amounts of memory prefetching the next 10 googled websites and not clearing its cache abound over the web (300mb consumed in 10 minutes). Hopefully it has been fixed, I do not know I shifted to opera.

First, I am running 98SE, not ME. Second, I have NOT limited the swap file. I have simply moved it to a different physical drive than the one the OS is installed on. Third, I HAVE limited vcache (to 96MB) to prevent it from using too much address space. And fourth, Firefox works fine for me. YMMV. BTW, I did search for the advice of the MS-MVPs you mentioned, and their advice is helpful.

Basically, I took the easy route, and let Cacheman recommend settings for [386Enh] and [vcache]. Cacheman recommended MinFileCache=16384, MaxFileCache=98304, and Chunksize=512. So I allowed it to put those settings in system.ini. Cacheman also recommended unloading inactive DLLs from memory, ConservativeSwapfileUsage=1, and limiting available Ram to 512MB. After allowing those changes, I found MaxPhysPage=40000 (1GB) had been changed to 1FFFF (512MB). So system.ini now has pretty good settings.

I found helpful info at http://aumha.org/win4/a/memmgmt.htm,

http://www.computing.net/windows95/wwwboard/forum/74807.html, and http://support.microsoft.com/kb/179191/en-us.

Apparently, Win95 created a new swap file at each boot, but to save time during restarts, Win98/ME just reuses the existing swap file, regardless of size. If any of your apps are causing runaway growth of your swap file, you are stuck with an oversized swap file until you FORCE windows to create a new one. Basically, in 98/ME, you can reboot to a command prompt and delete your swap file manually, use a custom wininit.ini as eidenk described, or live with an oversized swap file. If you let windows manage it (recommended) the only 'management' windows does is to make it bigger when the existing size isn't big enough. That's preferable to crashing the OS, but leaves you with a HUGE swap file forever, whether you need it that size again or not. So if you want it to shrink, under 98/ME, you've got to FORCE it to happen (by deleting the old swap file). Under Win95, all you had to do was reboot your system.

Edited by joe tweaker
Link to comment
Share on other sites

I have had my swap file increase, then decrease itself (on reboot I think?) I'm using Win98SE

Same here (fully Auto-patched 98SE). How much free space on your hard drive?

I've got 10 GB free where I put my swap file, and mine just kept growing (until I deleted it).

Cacheman showed usage going up and down, but file size only went up.

I wonder if one of the unofficial patches or updates causes the behavior to change?

I've no idea which files are involved.

Edited by joe tweaker
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...