diff --git a/en_US.ISO8859-1/books/faq/book.sgml b/en_US.ISO8859-1/books/faq/book.sgml index cfb2a74f17..17af9579e0 100644 --- a/en_US.ISO8859-1/books/faq/book.sgml +++ b/en_US.ISO8859-1/books/faq/book.sgml @@ -6365,91 +6365,12 @@ C:\="DOS" - - The best way is to increase the size of your swap partition, - or take advantage of this convenient excuse to add another - disk. The general rule of thumb is to have around 2x the swap - space as you have main memory. However, if you have a very - small amount of main memory you may want to configure swap - beyond that. It is also a good idea to configure sufficient - swap relative to anticipated future memory upgrades so you do - not have to futz with your swap configuration later. - - Adding swap onto a separate 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. - - When you have several disks, configuring a swap partition on - each one is usually beneficial, even if you wind up putting - swap on a work disk. Typically, each fast disk in your system - should have some swap configured. FreeBSD supports up to 4 - interleaved swap devices by default. When configuring multiple - swap partitions you generally want to make them all about the - same size, but people sometimes make their primary swap - partition larger in order to accommodate a kernel core dump. Your - primary swap partition must be at least as large as main memory - in order to be able to accommodate a kernel core. - - IDE drives are not able to allow access to both drives on - the same channel at the same time (FreeBSD does not support mode - 4, so all IDE disk I/O is programmed). - It is still suggested that you put your swap partition on a - separate driver, however: the drives are so cheap, it is not - worth worrying about. - - Swapping over NFS is only recommended if you do not have a - local disk to swap to. Swapping over NFS is slow and - inefficient in FreeBSD releases prior to 4.x, but reasonably - fast in releases greater or equal to 4.0. Even so, it will be - limited to the network bandwidth available and puts an - additional burden on the NFS server. - - Here is an example for 64Mb vn-swap - (/usr/swap0, though of course you can use - any name that you want). - - Make sure your kernel was built with the line - - pseudo-device vn 1 #Vnode driver (turns a file into a device) - - in your config-file. The GENERIC kernel already contains - this. - - - - create a vn-device - &prompt.root; cd /dev -&prompt.root; sh MAKEDEV vn0 - - - - create a swapfile (/usr/swap0) - - &prompt.root; dd if=/dev/zero of=/usr/swap0 bs=1024k count=64 - - - - set proper permissions on (/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. - - - - reboot the machine - - - - To enable the swap file immediately, type - - &prompt.root; vnconfig -e /dev/vn0b /usr/swap0 swap + In the Configuration and + Tuning section of the Handbook, you will find a + section + describing how to do this.