Re: Memory Mangement Problem in 5.1-RELEASE

From: Tim Kientzle <kientzle_at_acm.org>
Date: Fri, 25 Jul 2003 12:09:59 -0700
Ahmed Al-Hindawi wrote:
> This is not the problem. We know what is the purpose of swap data. It is 
> swaping when there is more than suffiecient memory to do so. There is 
> disk activity on the swap disk (I have a seperate disk for faster 
> access) even when there is enough memory to suit my request and more.
> 
> It is simply swapping when it shouldn't.
> 
> Opening Mozilla, Opera, Netscape, DrJava, jEdit, Emacs, PrBoom, 
> XBubbles, and Nautilus at the same time on a 233Mhz machine should fill 
> up the memory (160Mb) but instead it has decided to use the swap disk 
> for a measly 50Mb which I do have in RAM!!

This is definitely an FAQ.

In short, FreeBSD manages swap space differently than
does Linux or other systems.  In particular, FreeBSD will
copy data to swap preemptively in order to fulfill future
memory requests more quickly.  (By copying the data to swap
now in the background, it can avoid stalling a future
memory request because those blocks can simply be
reallocated without waiting on the disk at the time
the request is made.)

If your system is spending a lot of time moving
data to and from swap when it is not memory-starved,
or if it is stalling memory allocations that it should
be able to fulfill from free RAM, that's a concern.
Otherwise, it is perfectly normal and expected to see
a low level of swap activity even when memory is not
completely full.

Tim Kientzle
Received on Fri Jul 25 2003 - 10:09:58 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:16 UTC