home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / os / os2 / apps / 9966 < prev    next >
Encoding:
Internet Message Format  |  1993-01-08  |  2.7 KB

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