Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 28 Jan 2002 17:35:01 +0100
From:      Erik Trulsson <ertr1013@student.uu.se>
To:        Chris Corayer <CCorayer@adetech.com>
Cc:        "'questions@FreeBSD.ORG'" <questions@FreeBSD.ORG>
Subject:   Re: Swap space questions.
Message-ID:  <20020128163501.GA85786@student.uu.se>
In-Reply-To: <DDB0EE290EC6D41190F000D0B73C6A1F021FD0BA@adehqmail.ade.com>
References:  <DDB0EE290EC6D41190F000D0B73C6A1F021FD0BA@adehqmail.ade.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Jan 28, 2002 at 11:07:28AM -0500, Chris Corayer wrote:
> I have an old Alpha Server.  It currently has 6 disks in it.  I also have
> another dual P3 system with five disks.  How many of those disks can/should
> have swap space?  I recall reading in the handbook somewhere that it there
> should be no more than 4.  Why not?

By default the kernel cannot handle more than 4 swap devices at once.
To change this you need to recompile the kernel after adding the line

options   NSWAPDEV=4

to your kernel config file.  (With '4' changed to the number of
swapdevices you need.)
Increasing this value increases the memory needed by the kernel so
don't make it too large.


> 
> I've also read that the swap should not be the first partition/slice? on the
> disk.  Does this apply only for the first disk with / on it, or for all of
> them?

AFAIK you can put the swap wherever you want on the disk.
For example I have the following layout:   (output from 'disklabel ad0')


8 partitions:
#        size   offset    fstype   [fsize bsize bps/cpg]
  a:   163840   409600    4.2BSD        0     0     0 	# (Cyl.   27*- 37*)
  b:   409600        0      swap                    	# (Cyl.    0 - 27*)
  c: 16510977        0    unused        0     0       	# (Cyl.    0 - 1091*)
  e:  1331200   573440    4.2BSD        0     0     0 	# (Cyl.   37*- 125*)
  f:  3809280  1904640    4.2BSD     1024  8192    24 	# (Cyl.  125*- 377*)
  g: 10797057  5713920    4.2BSD        0     0     0 	# (Cyl.  377*- 1091*)

Note that swap is indeed the first thing on the disk. This has not
caused any problems for me.


> 
> Can anyone point me to more definitive answers?
>  
> Thank you in advance.

-- 
<Insert your favourite quote here.>
Erik Trulsson
ertr1013@student.uu.se

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020128163501.GA85786>