From owner-freebsd-questions@FreeBSD.ORG Mon Oct 2 18:23:18 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org 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 9ECB916A58E for ; Mon, 2 Oct 2006 18:23:18 +0000 (UTC) (envelope-from cswiger@mac.com) Received: from pi.codefab.com (pi.codefab.com [199.103.21.227]) by mx1.FreeBSD.org (Postfix) with ESMTP id 09F7343D49 for ; Mon, 2 Oct 2006 18:23:18 +0000 (GMT) (envelope-from cswiger@mac.com) Received: from localhost (localhost [127.0.0.1]) by pi.codefab.com (Postfix) with ESMTP id 44B995EBD; Mon, 2 Oct 2006 14:23:17 -0400 (EDT) X-Virus-Scanned: amavisd-new at codefab.com Received: from pi.codefab.com ([127.0.0.1]) by localhost (pi.codefab.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ioMoq5EONjhD; Mon, 2 Oct 2006 14:23:15 -0400 (EDT) Received: from [199.103.21.238] (pan.codefab.com [199.103.21.238]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by pi.codefab.com (Postfix) with ESMTP id E39C05C62; Mon, 2 Oct 2006 14:23:15 -0400 (EDT) In-Reply-To: <200610021406.39143.bob@tania.servebbs.org> References: <200610020048.47955.bob@tania.servebbs.org> <452110B6.2010800@mac.com> <200610021406.39143.bob@tania.servebbs.org> Mime-Version: 1.0 (Apple Message framework v752.2) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: Content-Transfer-Encoding: 7bit From: Charles Swiger Date: Mon, 2 Oct 2006 14:23:11 -0400 To: Bob X-Mailer: Apple Mail (2.752.2) Cc: freebsd-questions@freebsd.org Subject: Re: SWAP priority X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Oct 2006 18:23:18 -0000 On Oct 2, 2006, at 2:06 PM, Bob wrote: > On Monday 02 October 2006 09:14, Chuck Swiger wrote: >> The swap system knows how to interleave data between the >> additional swap >> areas relatively efficiently, > > Yes I discovered that. The additional swap space was instantly used > as soon as > I activated it; and the added swap improved things measurably. Does > the swap > system take into account current disk activity when it decides to > use a > particular swap? Sort of. The syncer process runs at idle priority, so normal I/O initiated by your processes will take priority over paging/swapping idle pages of RAM out. There may be additional logic involved to help balance I/O in terms of which swapfile is being used if one drive remains busier than another, but I am not completely familiar with FreeBSD's implementation. >> that you need to use more than 2GB of swapspace on a machine with >> 1GB of >> RAM, you should add more RAM, not more swapspace.... > > It is on order. > > The basis for my question about swap priority was based on an > observation that > the slowdown was due to swapping AND heavy disk usage. I noticed > that when > snapshots were being made on the main drive (the one I am using all > the > time), all other processes went to slow-mode. You see, the lack of > enough > memory caused the system to swap, and it swapped to the heaviest > used raid > array. I thought if I could force the system to swap to the other > raid array > (much less used) with the new swapfile, things would improve even > more. Well, you might try benchmarking the system with both arrays used for swapping and with only the less-busy RAID array being used for swapping, and see which one does better. -- -Chuck