home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!haven.umd.edu!darwin.sura.net!gatech!concert!rutgers!njitgw.njit.edu!hertz.njit.edu!dic5340
- From: dic5340@hertz.njit.edu (David Charlap)
- Newsgroups: comp.os.os2.apps
- Subject: Re: Does anyone know...Swap File
- Message-ID: <1993Jan8.161429.25663@njitgw.njit.edu>
- Date: 8 Jan 93 16:14:29 GMT
- References: <1993Jan6.204721.27215@apgea.army.mil> <1993Jan6.222411.502@njitgw.njit.edu> <1993Jan7.144505.6099@nntpd.lkg.dec.com>
- Sender: news@njit.edu
- Organization: New Jersey Institute of Technology, Newark, N.J.
- Lines: 39
- Nntp-Posting-Host: hertz.njit.edu
-
- In article <1993Jan7.144505.6099@nntpd.lkg.dec.com> cambria@smaug.enet.dec.com (Michael C. Cambria) writes:
- >In article <1993Jan6.222411.502@njitgw.njit.edu>, dic5340@hertz.njit.edu (David Charlap) writes...
- >>No. The swap file is much like a stack. When pages at the end of the
- >>file are released, the file will shrink. It grows and shrinks in 1MB
- >>increments. Also, pages that were swapped out don't normally get
- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- >>swapped back in until they're used, so the file may not shring when
- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- >>you expect it to. Finally, compression is only done during idle time,
- >>so periods of high activity will prevent shrinkage.
- >
- >I've allocated and written to as much as 25MB of virtual memory,
- >causing the swap file to grow large. The program exits, I leave
- >the PC for one or more hours, and the swap file stays about the
- >same. If I do something with the machine instead of walking away
- >for a few hours, the swap file will shrink, but not much.
- >
- >However, if I run the same program, memlab1.exe, but just allocate
- >and write to 1 32 bit word (I know that a 4K page is still allocated)
- >and then exit, the swap file shrinks to just above the minimum value
- >specified in config.sys.
-
- This sounds like what I'd expect. If you allocate 32MB of VM and then
- quit, there's a good chance that your memlab1.exe program has been
- swapped out to the END of the swap file. And there it sits. When you
- run it again, the page is swapped back in, and now there's a
- contiguous block of free swap space all the way to the end of the
- file, and the swap file is truncated appropriately.
-
- The bug doesn't seem to be in swap file compression. It appears that
- the system doesn't automatically swap-in program segments that have
- just terminated. This has the effect of keeping the swap file large,
- but programs, once started the first time, load much faster the second
- time.
- --
- |) David Charlap | .signature confiscated by FBI due to
- /|_ dic5340@hertz.njit.edu | an ongoing investigation into the
- ((|,) | source of these .signature virusses
- ~|~
-