Updated docs for swapfile setup, added some commentary suggested

by William Lloyd.
This commit is contained in:
Peter da Silva 1997-09-30 18:40:19 +00:00
parent ecbc52337f
commit dd7db1e70a
Notes: svn2git 2020-12-08 03:00:23 +00:00
svn path=/head/; revision=2019

View file

@ -1,12 +1,12 @@
<!DOCTYPE linuxdoc PUBLIC "-//FreeBSD//DTD linuxdoc//EN">
<!-- $Id: FAQ.sgml,v 1.77 1997-09-30 17:46:40 pds Exp $ -->
<!-- $Id: FAQ.sgml,v 1.78 1997-09-30 18:40:19 pds Exp $ -->
<article>
<title>Frequently Asked Questions for FreeBSD 2.X
<author>Maintainer: Peter da Silva <tt><htmlurl url='mailto:peter@taronga.com'
name='&lt;peter@taronga.com&gt;'></tt>
<date>$Date: 1997-09-30 17:46:40 $</date>
<date>$Date: 1997-09-30 18:40:19 $</date>
<abstract>
This is the FAQ for FreeBSD systems version 2.X All entries are
@ -2506,18 +2506,30 @@ drivedata: 0
<p>The best way is to increase the size of your swap partition, or
take advantage of this convenient excuse to add another disk (and
see <ref id="swap" name="this note"> if you do), but
<bf/Werner Griessl/ has provided these instructions for setting FreeBSD
up for swapping to a file:
see <ref id="swap" name="this note"> if you do).
<p>Adding swap onto a seperate disk makes things faster than
simply adding swap onto the same disk. As an example, if you
are compiling source located on one disk, and the swap is on
another disk, this is much faster than both swap and compile
on the same disk. This is true for SCSI disks specifically.
<p> IDE drives are not able to allow access to both drives on
the same channel at the same time. I would still suggest putting
your swap on a seperate drive however. The drives are so cheap,
it is not worth worrying about.
<p>It is a really bad idea to locate your swap file over NFS
unless you are running in a fast networking enviroment, with
a good server. If you can afford fast ethernet, you will not
need my advice anyway.
<p>Here is an example for 64Mb vn-swap (<tt>/usr/swap0</tt>, though
of course you can use any name that you want).
<p>
Make sure your kernel was built with the line
<verb>
pseudo-device vn #Vnode driver (turns a file into a device)
pseudo-device vn 1 #Vnode driver (turns a file into a device)
</verb>
in your config-file.
in your config-file. The GENERIC kernel already contains this.
<p>
<enum>
<item>
@ -2531,13 +2543,18 @@ cd /dev; sh ./MAKEDEV vn0
dd if=/dev/zero of=/usr/swap0 bs=1024k count=64
</verb>
<item>
put into /etc/rc.local the line
<verb>
vnconfig -ce /dev/vn0c /usr/swap0 swap
</verb>
enable the swap file in /etc/rc.conf
<verb>
swapfile="/usr/swap0" # Set to name of swapfile if aux swapfile desired.
</verb>
<item>
reboot the machine
</enum>
<p>To enable the swap file immediately try
<verb>
vnconfig -ce /dev/vn0c /usr/swap0 swap
</verb>
</sect1>