*BSD News Article 94734


Return to BSD News archive

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!cpk-news-hub1.bbnplanet.com!news.bbnplanet.com!ais.net!uunet!in1.uu.net!204.147.226.2!quack!quack.kfu.com!nsayer
From: nsayer@quack.kfu.com (Nick Sayer)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: How to increase size of vn-device swapfile?
Date: 28 Apr 1997 20:58:03 GMT
Organization: The Duck Pond public unix - http://www.kfu.com/
Lines: 46
Message-ID: <5k330r$qcs$1@phoenix.kfu.com>
References: <5jf770$mbj@chenab.lums.edu.pk>
NNTP-Posting-Host: quack.kfu.com
X-Newsreader: NN version 6.5.1 (NOV)
Xref: euryale.cc.adfa.oz.au comp.unix.bsd.freebsd.misc:39966


aslam@lums.edu.pk (Sohail Aslam) writes:

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

You must stop using it, then increase its size.

>2. How can I disable swapping to the vn-device?

You must remove the vnconfig from rc.local and reboot.

>3. Is the performance of swapping/paging on a vn-device the same as on
>   a hard partition?

It can't help but be a little less, since it has to figure out what
blocks are swap rather than simply using a range.

It's not so terrible, though. It interleaves the swap devices
so that if they're on different spindles you can win from that.

>For the time being, I created another vn-device (vn1c) and another 64MB
>file in /var (swap1) and vnconfig'd swap on it.

Ick. If you interleave two swap chunks on the same disk, you do a lot of
seeking between them.

>-- 
>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
-- 
Nick Sayer  http://www.kfu.com/~nsayer/ | 
nsayer [at] quack [dot] kfu [dot] com   | "Hate Crime" == "ThoughtCrime"
UNSOLICITED BULK EMAIL IS UNACCEPTABLE  | 
AND WILL BE CONSIDERED AS HARASSMENT    |