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