From owner-freebsd-questions@FreeBSD.ORG Tue Oct 14 05:45:21 2003 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 502F016A4F6 for ; Tue, 14 Oct 2003 05:45:21 -0700 (PDT) Received: from be-well.ilk.org (lowellg.ne.client2.attbi.com [66.30.200.37]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7909D43F3F for ; Tue, 14 Oct 2003 05:45:18 -0700 (PDT) (envelope-from freebsd-questions-local@be-well.ilk.org) Received: by be-well.ilk.org (Postfix, from userid 1147) id CBE6A3AFE; Tue, 14 Oct 2003 08:45:17 -0400 (EDT) Sender: lowell@be-well.ilk.org To: freebsd-questions@freebsd.org References: <200310131437.h9DEbGfE005590@clunix.cl.msu.edu> From: Lowell Gilbert Date: 14 Oct 2003 08:45:17 -0400 In-Reply-To: <200310131437.h9DEbGfE005590@clunix.cl.msu.edu> Message-ID: <44he2cyoma.fsf@be-well.ilk.org> Lines: 50 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: Problem with adding more swap ! X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Oct 2003 12:45:21 -0000 X-List-Received-Date: Tue, 14 Oct 2003 12:45:21 -0000 Jerry McAllister writes: > Well, if you can spread it across multiple controllers, it can > speed things up. Right. > But, generally I think that swap is used in > a serial manner, eg the first chunk gets used up before the > next one is started, etc. That's wrong. See the Handbook section titled "Swap Partition". http://www.freebsd.org/handbookconfigtuning-initial.html#SWAP-DESIGN > So, that would mean that you would > want to put only a little on the boot drive (you need some there > for special occasions) and most of the rest on another drive > and another controller if you can. Because FreeBSD tries to "stripe" the usage across all of the swap space, you're best off giving it space on all of the disks. However, if your disks are not all the same speed, you're better off sticking to the fastest ones for swap space. > Compared to the CPU, disk > access is rather slow, so anything you can do to spread out > the work across more than one disk tends to speed things up. That's true, but also note that swap partition usage is faster than regular disk usage, so it can be useful even for clean pages. > But, if you are the only one using the machine and that is > mostly for one activity at a time you probably won't notice > any difference. There's one exception to this: the *most* useful case for optimizing swap is where a single task has a working data set that doesn't fit in memory. In that case, every little bit of speed you can tweak out of swap access will improve results substantially. Of course, additional RAM would help even more. The one other thing to note about swap space is that you can't do a kernel dump unless you have a partition big enough to hold it. The easiest way to guarantee that's available is to leave a swap partition bigger than your RAM. But if you need to, you can always limit the amount of RAM your kernel is using to just under the size of the largest available partition, so that's not necessarily critical either. Good luck.