home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / sys / sun / admin / 6085 < prev    next >
Encoding:
Internet Message Format  |  1992-09-02  |  1.7 KB

  1. Path: sparky!uunet!auspex-gw!guy
  2. From: guy@Auspex.COM (Guy Harris)
  3. Newsgroups: comp.sys.sun.admin
  4. Subject: Re: minimum swap space for SunOS 4.1.x?
  5. Message-ID: <14442@auspex-gw.auspex.com>
  6. Date: 2 Sep 92 21:37:02 GMT
  7. References: <1992Sep1.211624.9653@nsisrv.gsfc.nasa.gov> <1992Sep2.205732.20742@nsisrv.gsfc.nasa.gov>
  8. Sender: news@auspex-gw.auspex.com
  9. Organization: Auspex Systems, Santa Clara
  10. Lines: 27
  11. Nntp-Posting-Host: bootme.auspex.com
  12.  
  13. >"Guess it depends on what you mean by "must" be larger than
  14. >physical ram.  If your swap ISN'T bigger than physical ram, then
  15. >you might as well take that excess ram and toss it - it'll never get
  16. >used.  
  17. >
  18. >Suns pre-allocate space for text.
  19.  
  20. If that means "Suns pre-allocate swap space for text", 'tain't so under
  21. 4.x.  SunOS 4.x only pre-*reserves* swap space for regions of the
  22. address space that are mapped copy-on-write to a file *and* that are
  23. marked writable.
  24.  
  25. Yes, the text of a demand-paged executable, as well as the text of
  26. a shared library, is mapped copy-on-write to the file.  Yes, it is
  27. marked writable *if* the run-time loader has to do relocation on it, but
  28. even then, once it's done any necessary relocation, it marks it
  29. read-only again, which causes the reservation to be withdrawn (modulo
  30. bugs).
  31.  
  32. BSS space and "sbrk" space also has swap space allocated to it.
  33.  
  34. So, if your swap space is smaller than the physical RAM, you won't
  35. *necessarily* be unable to use all the physical RAM; it can still be
  36. used for stuff not mapped copy-on-write to files and not
  37. BSS/"malloc()"ed/SV shared memory (for example, for pages read
  38. from/written to files).  You will, however, have problems if some
  39. application wants all of it for BSS or "malloc()"ed stuff.
  40.