*BSD News Article 94093


Return to BSD News archive

Newsgroups: comp.unix.bsd.freebsd.misc
Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!munnari.OZ.AU!news.ecn.uoknor.edu!feed1.news.erols.com!news.maxwell.syr.edu!news.apfel.de!univ-lyon1.fr!fdn.fr!r2d2.fdn.org!sphynx.fdn.fr!causse
From: causse@sphynx.fdn.fr (Philippe Causse)
Subject: Re: How to increase size of vn-device swapfile?
X-Newsreader: TIN [version 1.2 PL2]
Organization: individual - paris - france
Message-ID: <E90E98.1Dq@sphynx.fdn.fr>
References: <5jf770$mbj@chenab.lums.edu.pk>
Date: Mon, 21 Apr 1997 22:24:44 GMT
Lines: 44
Xref: euryale.cc.adfa.oz.au comp.unix.bsd.freebsd.misc:39470


Sohail Aslam (aslam@lums.edu.pk) wrote:
: I followed the instructions in the FAQ on adding a vn-device to increase
: swap size:

:   1.  create a vn-device
:            cd /dev; sh ./MAKEDEV vn0
:   2.  create a swapfile (/var/swap0)
:            dd if=/dev/zero of=/var/swap0 bs=1024k count=64
:   3.  put into /etc/rc.local the line
:            vnconfig -ce /dev/vn0c /var/swap0 swap

: Questions:
: 1. How can increase the size of /var/swap0 (the file)? 
No ! If you expand the file, it may corrupt the data already placed
in the active swap file...
Just add a second swap file :-)

: 2. How can I disable swapping to the vn-device?
There isn't any swapoff command! The only solution is to edit your
/etc/vntab (to disable it), then reboot, increase the size of the swap-file,
and re-activate-it !

: 3. Is the performance of swapping/paging on a vn-device the same as on
:    a hard partition?
No ! Swapping on a file is many times slower than swapping on a disk
partition because pagings requests have to go through the VFS/FFS layer.
Swapping on the disk is considerably faster and should be used as much
as possible.
Another improvement is to define swapping areas on two different discs (or
more) since it will reduce bottlenecks. (same principle as RAID-0).

: For the time being, I created another vn-device (vn1c) and another 64MB
: file in /var (swap1) and vnconfig'd swap on it.
That's the only reasonable thing to do, if you can't afford a new disk!

: -- 
: Sohail Aslam                   
: Department of Computer Science, Lahore University of Management Sciences (LUMS)
: Lahore, Pakistan    tel: 92-42-572-2670   fax: 92-42-572-2591
: email: aslam@lums.edu.pk
-- 
-------------------------------------------------------------------
P. Causse			http://www.fdn.fr/~pcausse
4.4BSD/X11R6/Motif-2.0/C++	mailto:causse@sphynx.fdn.fr (UUCP)