home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / unix / aux / 4601 < prev    next >
Encoding:
Text File  |  1993-01-11  |  3.7 KB  |  68 lines

  1. Newsgroups: comp.unix.aux
  2. Path: sparky!uunet!zaphod.mps.ohio-state.edu!uwm.edu!linac!att!cbnews!djz
  3. From: djz@cbnews.cb.att.com (danny.zerkel)
  4. Subject: Re: SWAP size for 20MB IIci?
  5. Organization: AT&T
  6. Distribution: usa
  7. Date: Mon, 11 Jan 1993 20:55:15 GMT
  8. Message-ID: <1993Jan11.205515.1525@cbnews.cb.att.com>
  9. References: <1367@jagubox.gsfc.nasa.gov> <1368@jagubox.gsfc.nasa.gov> <1993Jan9.225116.18441@noao.edu>
  10. Lines: 56
  11.  
  12. In article <1993Jan9.225116.18441@noao.edu> tody@noao.edu writes:
  13. >In article <1368@jagubox.gsfc.nasa.gov>, jim@jagubox.gsfc.nasa.gov (Jim Jagielski) writes:
  14. >> I ramble:
  15. >> 
  16. >> >tody@noao.edu (Doug Tody) writes:
  17. >> 
  18. >> >>This is what I thought too, but swap appears to work differently under A/UX
  19. >> >>than most UNIX systems.  On most UNIX systems I have seen swap space is
  20. >> >>allocated when virtual memory is allocated to a process; every time you run
  21. >> >>a process or do a malloc in the process you see the available swap space
  22. >> >>decrease.  On A/UX however, if you can believe swap -l, NO swap space is
  23. >> >>used until the total virtual memory usage exceeds the physical memory
  24. >> >>available.  Hence if you have vast amounts of physical memory, little or no
  25. >> >>swap is used.
  26. >> 
  27. >> >One must recall that A/UX (as well as other "newer" :) Unices) perform both
  28. >> >swapping and paging... 
  29.  
  30. Well... not really...
  31.  
  32. >
  33. >Well, of course.  I was referring mainly to differences in how these systems
  34. >handle paging of virtual memory.  UNIX systems use the swap area for paging
  35. >as well as swap; for a virtual memory system swapping and paging are closely
  36. >related.  Most UNIX systems preallocate space in the swap area for paging
  37. >when memory is *allocated* by a process - whether or not the process has any
  38. >writable pages paged out.  On a busy system this guarantees that the space
  39. >will be there when if and when it is needed.  A/UX is unusual in that it
  40. >appears to wait until physical memory is exhausted, i.e., until it actually
  41. >has to page something out, before allocating space in the swap area.  On
  42. >most UNIX systems, as someone said earlier, one typically allocates
  43. >something like 2 times the physical memory for swap, e.g., 40-80 Mb or even
  44. >more on some systems.  A/UX appears to be able to make do with much less
  45. >swap space and swap usage tends to decrease as the physical memory increases.
  46.  
  47. A/UX 3.0 is based (like it's predicessors) on AT&T SVR2.  The paging system
  48. in SVR2 and SVR3 is seriously flawed.  Unlike the BSD based virtual memory
  49. system, SVR2&3 consider swap space to be an extension of memory space.  So
  50. in theory, your "virtual" memory space is RAM + swap space.  Unfortunately,
  51. in order for the kernel to allocate more memory for a process, that memory
  52. must be "free" all at once in the RAM area.  To keep enough memory free,
  53. the "vhand" process scans memory looking for old pages to throw out when a
  54. low memory condition occurs.  How much memory to keep free and how often to
  55. look are what you tune in vhand.  However, since vhand is "just-another-
  56. process", other processes go into memory starvation before vhand can clean
  57. up enough space.  When SVR2&3 run out of memory in swap they start limping.
  58. I have seen systems take 20 minutes or more to shutdown when they are out
  59. of memory.  And there is nothing you can do about it.  Fortunately, SVR4
  60. did not keep this system.  They use a BSD-like virtual memory scheme, where
  61. your experience with 2 * mem == swap is true, since BSD virtual memory is
  62. the size of swap space; and RAM is just a mapping of that space.
  63.  
  64. ---------------------------------------------------------------------------
  65. Danny J. Zerkel, AT&T Bell Labs, Columbus, OH
  66. "Proprietary information contained in this line only!" -- Use your secret
  67.  decoder ring to find it!
  68.