*BSD News Article 6643


Return to BSD News archive

Newsgroups: comp.unix.bsd
Path: sserve!manuel.anu.edu.au!munnari.oz.au!spool.mu.edu!uwm.edu!zaphod.mps.ohio-state.edu!darwin.sura.net!bogus.sura.net!pandora.pix.com!stripes
From: stripes@pix.com (Josh Osborne)
Subject: Re: Adding Swapspace ??
Message-ID: <Bw8Mw5.IFC@pix.com>
Sender: news@pix.com (The News Subsystem)
Nntp-Posting-Host: pandora.pix.com
Organization: Pix Technologies -- The company with no adult supervision
References: <Bw7H4L.LLB@cosy.sbg.ac.at> <1992Oct16.162729.3701@ninja.zso.dec.com> <1992Oct16.201806.21519@fcom.cc.utah.edu>
Date: Fri, 16 Oct 1992 23:36:04 GMT
Lines: 46

In article <1992Oct16.201806.21519@fcom.cc.utah.edu> terry@cs.weber.edu (A Wizard of Earth C) writes:
[...]
>And people wonder why I recommend putting the swap last, just before a
>DOS partition.  The reason is to allow you to back up your DOS (for which
>there is good, fast, reliable backup available, much as it pains me to say

What's wrong with the rdump, or tar cf - | rsh box.with.tape cat \>/dev/rst08?
Or getting a tape with a working driver...

>it), move the DOS partition, and simply blow the disk label to increase
>your swap.  Restore the DOS garbage to the DOS partition.
>
>What we really need is the ability to swap to a file (any file -- say an
>NFS mounted one, for instance) and get rid of the idea of a swap
>partition altogether.  Then you make a default swap file out of a
>bunch of contiguous file system blocks; if you let it grow, you pay
>for it being discontinuous then; at least you don't have to reinstall.

 You also pay for going through the filesystem, the obvious costs of
having to use the indirect blocks becuse FFS is optimised for SMALL
files, not big ones.  FFS will also limit how comtiguous your data
blocks can be, part of each cyl group is reserved for inodes, and your
swapfile is going to be large enough to cover scads of cyl groups.  I also
seem to remember something about the FFS not allowing a big file to fill
an entire cyl group, to allow the inodes in that cyl group to be close
to the data blocks FFS assumes you will someday want close to them (but
I am unsure of this part).  You will (prob) also have the wrong inode
to data ratio.  I also don't think LSFS would be good for swaping on
either (but you could roll-back the swapfile :-).  You would still
want to be able to have >1 swap source so you can get multiple disks 
involved.

 That said, I think swaping on a file may be a good idea for (a) a stopgap
fix, and (b) it may make us design a filesystem that works well for
swap-like files, and (c) if you get a filesystem that does disk striping
wouldn't you want swap on it?  (Please don't try to put swap on a
auto-compressing filesystem 'tho)

Please find a better way to swap over the network then NFS 'tho...
(ND anyone?  RVD?)
-- 
           stripes@pix.com              "Security for Unix is like
      Josh_Osborne@Real_World,The          Multitasking for MS-DOS"
      "The dyslexic porgramer"                  - Kevin Lockwood
We all agree on the necessity of compromise.  We just can't agree on
when it's necessary to compromise.       - Larry Wall