home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / sys / sun / misc / 3980 < prev    next >
Encoding:
Internet Message Format  |  1992-08-27  |  1.6 KB

  1. Path: sparky!uunet!zaphod.mps.ohio-state.edu!uwm.edu!ogicse!plains!prototype!harlick
  2. From: harlick@prototype.uucp (Ryan Harlicker)
  3. Newsgroups: comp.sys.sun.misc
  4. Subject: Swap partitions smaller than physical memory.
  5. Summary: It can be done.
  6. Message-ID: <1992Aug28.060857.15242@prototype.uucp>
  7. Date: 28 Aug 92 06:08:57 GMT
  8. Article-I.D.: prototyp.1992Aug28.060857.15242
  9. References: <1992Aug26.165257.5891@xilinx.com> <1992Aug27.110647.2163@infodev.cam.ac.uk>
  10. Organization: None is Needed or Wanted
  11. Lines: 36
  12.  
  13. On the subject of: 
  14.  
  15. >1. An off the cuff remark made in a thread on tuning swap (saying that your
  16. >   primary swap partition should be at least as large as physical memory)
  17.     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  18.  
  19. This is something that used to bug me about unix but I hacked a solution
  20. that might be useful to some.  Here is my situation:
  21.  
  22.     I have a sun 3/110 with a limited amount of diskspace and 28 meg of 
  23. ram.  I didn't want to waste 28meg of disk space simply mirroring my 
  24. physical memory.  This is what I did.
  25.  
  26. 1.) Reduced my swap partition to the minimal bootable size.  Mine turned out
  27.     to be 1 megabyte.
  28.  
  29. 2.) Boot to single user mode.
  30.  
  31. 3.) Create an empty swapfile of the correct size using the mkfile -n command.
  32.     (mine was mkfile -n 27M)
  33.  
  34. 4.) change the permissions to read only for root
  35.  
  36. 5.) add a swapon command for your empty swapfile in you rc.boot/rc.local file.
  37.  
  38. 6.) enjoy your extra diskspace.
  39.  
  40.  
  41.     This seems to work most of the time, but over time I find that the
  42. swapfile slowly gets filled.  At that time I simply redo the hack.
  43.  
  44.  
  45. Comments?,
  46.  
  47. Ryan Scott Harlicker
  48. harlick@plains.nodak.edu
  49.