*BSD News Article 6955


Return to BSD News archive

Newsgroups: comp.unix.bsd
Path: sserve!manuel.anu.edu.au!munnari.oz.au!spool.mu.edu!think.com!yale.edu!jvnc.net!darwin.sura.net!sgiblab!tsoft!barfeau
From: bbs.barfeau@tsoft.sf-bay.org (David Fox)
Subject: re: adding swap space
Message-ID: <Re04sB1w165w@tsoft.sf-bay.org>
Sender: bbs@tsoft.sf-bay.org (BBS User)
Organization: The TSoft BBS and Public Access Unix, +1 415 969 8238
Date: Fri, 23 Oct 1992 21:26:26 GMT
Lines: 44

>>In article <1992Oct18.082017.22382@fcom.cc.utah.edu>
terry@cs.weber.edu (A Wizard of Earth C) writes:
>[Some said, swap on files, I said...]

>>>|> 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).

> >>Recent work makes the ffs a lot faster.. MACH swaps to the ffs

> >Faster for what? Random access to large sequental files (that's
> >what swaping >normally amounts to, but it could offen be sequental
> >access to large files), or to the common case for Unix filesystems,
> >small files?  Do they get around any of the problems I mentioned?

I would think that swapping to a partition (the way it does now) is
faster than swapping to a file in the filesystem.

However, even if it is slower, it may be worth it.  It's certainly (I 
think)
considerably more convenient to have a method where someone could 'mount' 
a
temporary swap file, say just before he does a large make.  When the make
finishes (and this time, it'll finish successfully because there's more
swap space available) then he can remove it.  Under normal conditions, 
he'll
be using the regular swap device, and only using the additional "file" 
swap
area when really necessary.

Compared with the 'standard' way of increasing swap space, which
amounts to reformatting the hard disk, and reinstalling 386bsd), I'd
choose the ability to simply swap to an additional file when needed.


--
David Fox (bbs.barfeau@tsoft.sf-bay.org)