Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 2 Oct 2006 14:23:11 -0400
From:      Charles Swiger <cswiger@mac.com>
To:        Bob <bob@tania.servebbs.org>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: SWAP priority
Message-ID:  <BA05A137-3CE6-421B-8EE3-2ACFB396F0B4@mac.com>
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>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?BA05A137-3CE6-421B-8EE3-2ACFB396F0B4>