home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / unix / bsd / 4422 < prev    next >
Encoding:
Internet Message Format  |  1992-08-19  |  2.7 KB

  1. Path: sparky!uunet!ferkel.ucsb.edu!taco!rock!stanford.edu!ames!sun-barr!cs.utexas.edu!swrinde!mips!darwin.sura.net!mojo.eng.umd.edu!pandora.pix.com!stripes
  2. From: stripes@pix.com (Josh Osborne)
  3. Newsgroups: comp.unix.bsd
  4. Subject: Re: swap allocation strategies
  5. Keywords: swap
  6. Message-ID: <Bt8Dqp.Btq@pix.com>
  7. Date: 19 Aug 92 12:37:36 GMT
  8. References: <19274@ector.cs.purdue.edu>
  9. Sender: news@pix.com (The News Subsystem)
  10. Organization: Project GLUE, Merriversity of Uniland, College Purgatory
  11. Lines: 50
  12. Nntp-Posting-Host: pandora.pix.com
  13.  
  14. In article <19274@ector.cs.purdue.edu> yeh@cs.purdue.EDU (Wei Jen Yeh) writes:
  15. [...]
  16. >  1.  Should I allocate another 64mb of swap region or two 32mb ones?
  17.  
  18. If you can put the 2 swaps on diffrent drives, and one drive isn't
  19. way slower or under way more use then it should be faster then 1 big swap.
  20. I don't know of any speed advantage to using 2 swaps on one drive (however
  21. for config testing it is handy to disable one and see if you can get away with 
  22. it, it's also nice if you can still run your system if a swap area gets a bad
  23. block that the disk & OS won't deal with).
  24.  
  25. >  2.  Where should they go? to the boot drive or the secondary drive?
  26.  
  27. Diffrent drives.
  28.  
  29. >  3.  Should I allocate a slice for the swap or use a swap file instead?
  30.  
  31. Swap files are normally slower since they go through the normal filesystem.
  32. I think they were invented for swapping over NFS and to make it easy to
  33. expand swap in a pinch.
  34.  
  35. >  4.  Should I reinstall the system and start w/ a single 128 mb of main swap?
  36. >      (if it's better to have a single swap region.), or four slices of
  37. >      size 32mb?
  38.  
  39. If you have 4 disks for the four swaps that's best (subject to previously
  40. listed objections).
  41.  
  42. >Any suggestions?
  43. >
  44. >If it matters, I'm running Dell's sVr4 Issue 2.1.  Thanks.
  45.  
  46. Think of where your drive heads will be most offen.  If they will be
  47. page-faulting executables in get the swap close to the executables.
  48. If they will be close to /tmp (assuming you have no MFS/TMPFS) put
  49. the swap close to /tmp.  If it will be reading large user files sequentally,
  50. put it close to the user ppartition/slice.  If it will be close to 2 things
  51. put it in between.  If you have iostat, or something that can tell you
  52. which slice/partition is being accesses (sar might be able to) try watching
  53. it run durning your normmal load...
  54.  
  55. Buy solid-state swap devices :-)
  56.  
  57. Buy multiple small fast swap disks :-)
  58. -- 
  59.            stripes@pix.com              "Security for Unix is like
  60.       Josh_Osborne@Real_World,The          Multitasking for MS-DOS"
  61.       "The dyslexic porgramer"                  - Kevin Lockwood
  62. We all agree on the necessity of compromise.  We just can't agree on
  63. when it's necessary to compromise.       - Larry Wall
  64.