When does swap decreases

Dan Nelson dnelson at allantgroup.com
Tue Jun 21 03:01:44 GMT 2005


In the last episode (Jun 20), Francisco Reyes said:
> 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.

There may even be a performance gain, since if the system comes under
memory pressure again, some of the in-memory pages of those long-lived
processes previously copied to swap may still be clean, and the system
won't even have to page them out; it can simply free the RAM.  I can't
think of any way for there to be a performance hit, unless you actually
run out of swap.

-- 
	Dan Nelson
	dnelson at allantgroup.com


More information about the freebsd-questions mailing list