home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / sys / next / sysadmin / 7598 < prev    next >
Encoding:
Internet Message Format  |  1993-01-24  |  3.4 KB

  1. Path: sparky!uunet!paladin.american.edu!gatech!destroyer!fmsrl7!lynx.unm.edu!umn.edu!msus1.msus.edu!news.gac.edu!news!scott
  2. Newsgroups: comp.sys.next.sysadmin
  3. Subject: Re: Basic Swapfile Questions...
  4. Message-ID: <SCOTT.93Jan23113424@nic.gac.edu>
  5. From: scott@nic.gac.edu (Scott Hess)
  6. Date: 23 Jan 93 11:34:24
  7. References: <1jr3rjINNf7l@phakt.usc.edu>
  8. Distribution: world
  9. Organization: Is a sign of weakness
  10. NNTP-Posting-Host: nic.gac.edu
  11. In-reply-to: rawyatt@phakt.usc.edu's message of 23 Jan 1993 01:41:07 -0800
  12. Lines: 59
  13.  
  14. In article <1jr3rjINNf7l@phakt.usc.edu>
  15.     rawyatt@phakt.usc.edu (Robert Alexander Wyatt) writes:
  16. >Actually, I'm going to insult all of the NeXT geniuses and ask...
  17. >What exactly is a swapfile and why do I have it?  I know that it
  18. >gets bigger and bigger...how can I wipe it out?  Is there a terminal
  19. >command?  Can I simply erase it?
  20.  
  21. In essence, swapfile is the memory that you can't afford to buy.  The
  22. swapfile is the "where" of virtual memory, so when your on-board
  23. memory is full and you tell your machine that you want to launch
  24. something else, it has to put what is already in memory somewhere else
  25. so that the new program can be loaded.  So on my 32M machine, for
  26. instance, I might go a week without the swapfile rising above my 12M
  27. lowat mark (see below), mainly because most "normal" programs run fine
  28. in 32M (monochrome development system - your mileage will vary if you
  29. use color or Mathematica :-).
  30.  
  31. In other words, _don't_ wipe it out.  You don't want to, and really
  32. really bad things will happen if you do, with programs running out
  33. of memory and crashing all over the place for no _apparent_ reason.
  34. What you should do is edit the entries in /etc/swaptab so that your
  35. lowat is set to a lower number, so that on reboot you reclaim some
  36. space.  For instance, one of these lines:
  37.  
  38. /private/vm/swapfile    lowat=8388608    # 8 Meg low water mark
  39. /private/vm/swapfile    lowat=12582912    # 12 Meg low water mark
  40. /private/vm/swapfile    lowat=20971520    # 20 Meg low water mark
  41. #            ^^^^ this is a tab^^
  42.  
  43. The tabs _are_ important.  The third line is the default low water
  44. mark.
  45.  
  46. Note that some people are going to describe methods of deleting
  47. the files via rm.  Do _not_ do this.  At build time, the NeXT
  48. utilities allocate all of the disk space for the swapfile in more
  49. or less contiguous areas, which means that swapfile can be read
  50. from and written to faster than if you just placed the blocks in
  51. an on-demand fashion.  So, you are far better off to adjust the
  52. lowat mark to an acceptable value, in which case the first lowat
  53. bytes of swapfile will be fast.  If you delete it and then recreate
  54. it empty, you'll find that your system _will_ become slower when
  55. you start biting into the swapfile, possibly significantly slower
  56. if you don't have much disk space to work with (BSD FFS does better
  57. with more free areas to work with).  You can reallocate space using
  58. the mkfile command, but unfortunately there is no time quite as
  59. good as build-time to do this ...
  60.  
  61. >I have limited disk space...my swapfile is 16MB and my swapfile.front
  62. >is 37MB...what's the difference between the two?  what are their
  63. >purposes? That 50+ Meg sure could come in handy...(even a fraction
  64. >of it...)
  65.  
  66. swapfile and swapfile.front are two views of one and the same file.
  67. So, you've really only "lost" 16M.
  68.  
  69. Later,
  70. --
  71. scott hess <shess@ssesco.com>                        <To the BatCube, Robin>
  72. 12901 Upton Avenue South, #326  Burnsville, MN 55337 (612) 895-1208 Anytime!
  73.