On 2007-Apr-24 09:32:06 +0200, Harald Schmalzbauer <[EMAIL PROTECTED]> wrote:
>My box has 128MB memory, far enough for the task.

If you are regularly running out of space, then maybe not - at least
without tuning some parameters.

How much swap space do you actually have and what is your box trying
to do?  My firewall also has 128MB and it's only paged out 575 pages
in the last 9.7 days.

>After a few days I always see some processes dying because:
>
>+swap_pager_getswapspace(2): failed
>+pid 48211 (perl5.8.8), uid 58, was killed: out of swap space
>
>Why won't for example the 21MB Buf get freed before more swap space gets 
>requested than available (swap is very low, it's FlashDisk!)?

vfs.bufspace is inside a feedback loop that tries to keep it between
vfs.lobufspace and vfs.hibufspace - which are tuned based on memory
size by default (for 128MB RAM, hibufspace should be ~22MB).  You
could try seting kern.nbuf (in /boot/loader.conf) to reduce the buffer
space allocated (each buffer is 16KB).

>Is there a way to find out what process is swapped?

The ps output will include 'W'.  Note that 'swapped' is a special
state and normally processes are just paged.

In top and ps, the difference between 'size' and 'res' reflects memory
space that the process has allocated to it but is not resident.
Unfortunately, this includes both text area (which is vnode backed)
and space that has never been touched (and therefore doesn't exist
anywhere) as well as swap space.

Offhand, I don't know of any tool to report the swap utilisation by
process on FreeBSD.  (Though I have written such a tool for Tru64).

-- 
Peter Jeremy

Attachment: pgpWLbTKgGRf1.pgp
Description: PGP signature

Reply via email to