From owner-svn-doc-head@FreeBSD.ORG Sat May 17 19:52:19 2014 Return-Path: Delivered-To: svn-doc-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 31A512A0; Sat, 17 May 2014 19:52:19 +0000 (UTC) Received: from mail-gw14.york.ac.uk (mail-gw14.york.ac.uk [144.32.129.164]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EB18D21FD; Sat, 17 May 2014 19:52:18 +0000 (UTC) Received: from ury.york.ac.uk ([144.32.64.162]:17947) by mail-gw14.york.ac.uk with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.76) (envelope-from ) id 1WlkXy-0001GN-E8; Sat, 17 May 2014 20:45:30 +0100 Date: Sat, 17 May 2014 20:45:30 +0100 (BST) From: Gavin Atkinson X-X-Sender: gavin@ury.york.ac.uk To: Dru Lavigne Subject: Re: svn commit: r44770 - head/en_US.ISO8859-1/books/handbook/config In-Reply-To: <201405061418.s46EISgd036096@svn.freebsd.org> Message-ID: References: <201405061418.s46EISgd036096@svn.freebsd.org> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Cc: svn-doc-head@freebsd.org, svn-doc-all@freebsd.org, doc-committers@freebsd.org X-BeenThere: svn-doc-head@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the doc tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 May 2014 19:52:19 -0000 On Tue, 6 May 2014, Dru Lavigne wrote: > Author: dru > Date: Tue May 6 14:18:28 2014 > New Revision: 44770 > URL: http://svnweb.freebsd.org/changeset/doc/44770 > > Log: > Editorial review of Swap Space section. > This really belongs in the Storage chapter and should have a reference for ZFS swap. We generally recommend against using swap on ZFS, as it can currently be unstable under low-memory or high-activity situations. This will likely be fixed in the future though. Generally, I'll create a separate gmirror partition or similar for swap, and use the rest of the disks for the ZFS partiton. Gavin > > Sponsored by: iXsystems > > Modified: > head/en_US.ISO8859-1/books/handbook/config/chapter.xml > > Modified: head/en_US.ISO8859-1/books/handbook/config/chapter.xml > ============================================================================== > --- head/en_US.ISO8859-1/books/handbook/config/chapter.xml Tue May 6 13:38:06 2014 (r44769) > +++ head/en_US.ISO8859-1/books/handbook/config/chapter.xml Tue May 6 14:18:28 2014 (r44770) > @@ -2703,9 +2703,9 @@ kern.maxvnodes: 100000 > > Adding Swap Space > > - Sometimes a system requires more swap space. There are > - three ways to increase swap space: add a new hard drive, > - enable swap over NFS, or create a swap file > + Sometimes a system requires more swap space. This section > + describes two methods to increase swap space: adding swap to an > + existing partition or new hard drive, and creating a swap file > on an existing partition. > > For information on how to encrypt swap space, which options > @@ -2713,16 +2713,16 @@ kern.maxvnodes: 100000 > . > > > - Swap on a New or Existing Hard Drive > + Swap on a New Hard Drive or Existing Partition > > Adding a new hard drive for swap gives better performance > - than adding a partition on an existing drive. Setting up > + than using a partition on an existing drive. Setting up > partitions and hard drives is explained in > while > discusses partition > layouts and swap partition size considerations. > > - Use &man.swapon.8; to add a swap partition to the system. > + Use swapon to add a swap partition to the system. > For example: > > &prompt.root; swapon /dev/ada1s1b > @@ -2730,10 +2730,10 @@ kern.maxvnodes: 100000 > > It is possible to use any partition not currently > mounted, even if it already contains data. Using > - &man.swapon.8; on a partition that contains data will > + swapon on a partition that contains data will > overwrite and destroy that data. Make sure that the > partition to be added as swap is really the intended > - partition before running &man.swapon.8;. > + partition before running swapon. > > > To automatically add this swap partition on boot, add an > @@ -2742,34 +2742,26 @@ kern.maxvnodes: 100000 > /dev/ada1s1b none swap sw 0 0 > > See &man.fstab.5; for an explanation of the entries in > - /etc/fstab. > - > - > - > - Swapping over <literal>NFS</literal> > - > - Swapping over NFS is only recommended > - when there is no local hard disk to swap to. > - NFS swapping will be limited by the > - available network bandwidth and puts an additional burden > - on &man.nfsd.8;. > + /etc/fstab. More information about > + swapon can be found in > + &man.swapon.8;. > > > > - Swapfiles > + Creating a Swap File > > - To create a swap file, specify its size. The following > + To instead create a swap file, specify its size. The following > example creates a 64MB file named > /usr/swap0. > > > - Creating a Swapfile on &os; > + Creating a Swap File on &os; > > > > The GENERIC kernel already > - includes the memory disk driver (&man.md.4;) required > - for this operation. When building a custom kernel, > + includes the required memory disk driver. > + When building a custom kernel, > make sure to include the following line in the custom > configuration file: > > @@ -2780,31 +2772,33 @@ kern.maxvnodes: 100000 > > > > - First, create the swapfile > + Create the swap file, > /usr/swap0: > > - &prompt.root; dd if=/dev/zero of=/usr/swap0 bs=1024k count=64 > + &prompt.root; dd if=/dev/zero of=/usr/swap0 bs=1024k count=64 > > > > Then, set proper permissions on > /usr/swap0: > > - &prompt.root; chmod 0600 /usr/swap0 > + &prompt.root; chmod 0600 /usr/swap0 > > > > Enable the swap file in > /etc/rc.conf: > > - swapfile="/usr/swap0" # Set to name of swapfile if aux swapfile desired. > + swapfile="/usr/swap0" # Set to name of swap file > > > > - Reboot the machine or, to enable the swap file > - immediately, type: > + To enable the swap file > + immediately, specify a free memory device. Refer to > + for more information > + about memory devices. > > - &prompt.root; mdconfig -a -t vnode -f /usr/swap0 -u 0 && swapon /dev/md0 > + &prompt.root; mdconfig -a -t vnode -f /usr/swap0 -u 0 && swapon /dev/md0 > > > > >