Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 21 Jun 2005 09:30:27 -0400
From:      Bill Moran <wmoran@potentialtech.com>
To:        Francisco Reyes <lists@natserv.com>
Cc:        questions@freebsd.org, dnelson@allantgroup.com
Subject:   Re: When does swap decreases
Message-ID:  <20050621093027.24d339fa.wmoran@potentialtech.com>
In-Reply-To: <20050620225204.F41158@zoraida.natserv.net>
References:  <20050620141439.S36309@zoraida.natserv.net> <20050620182430.GE8497@dan.emsphone.com> <20050620144631.F37558@zoraida.natserv.net> <20050620185545.GF8497@dan.emsphone.com> <20050620225204.F41158@zoraida.natserv.net>

next in thread | previous in thread | raw e-mail | index | archive | help
Francisco Reyes <lists@natserv.com> wrote:

> On Mon, 20 Jun 2005, Dan Nelson wrote:
> > When the system is low on memory, it will force the least used
> > blocks of memory to swap.  It will not free the swap space until
> > the process owning them exits
> 
> Have not found any program to see what programs are using the swap, but as 
> I think about it, the current method is not very "smart". I guess any 
> other method is difficult to implement.
> 
> How wonder how the current method affects performance.
> Basically if there is a surge of memory usage and processes start that use 
> the swap and these processes are long lived.. I wonder if performance 
> will be affected.

The answer that was given to you on the usage of swap is greatly simplified.
As a result, it's natural that you would ask these kinds of questions.

In reality, FreeBSD's use of swap is _highly_ optimized.  Even if you don't
fully understand what it's doing ;)

If you're interested in the nitty-gritty details, I suggest you purchase
(or borrow) a copy of _The_Design_and_Implementation_of_FreeBSD_ and read
the detailed descriptions of how the pager and swapper work.  The complexity
of those two systems, and the reasoning behind how they're designed is more
than can easily be answered on an email list.

-- 
Bill Moran
Potential Technologies
http://www.potentialtech.com



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