Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 25 Apr 2007 09:49:58 +1000
From:      Peter Jeremy <peterjeremy@optushome.com.au>
To:        Harald Schmalzbauer <harry@schmalzbauer.de>
Cc:        stable@freebsd.org
Subject:   Re: question: +swap_pager_getswapspace(16): failed
Message-ID:  <20070424234958.GN1736@turion.vk2pj.dyndns.org>
In-Reply-To: <200704240932.06435.harry@schmalzbauer.de>
References:  <200704240932.06435.harry@schmalzbauer.de>

next in thread | previous in thread | raw e-mail | index | archive | help

--/Uq4LBwYP4y1W6pO
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On 2007-Apr-24 09:32:06 +0200, Harald Schmalzbauer <harry@schmalzbauer.de> =
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=
=20
>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).

--=20
Peter Jeremy

--/Uq4LBwYP4y1W6pO
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (FreeBSD)

iD8DBQFGLpem/opHv/APuIcRAgv2AKCuzzMTdkUKp3pJQvIzfnqVpflevQCfZ0Gr
DVlDRTcpwnYHZV7zDbkxchU=
=0zzP
-----END PGP SIGNATURE-----

--/Uq4LBwYP4y1W6pO--



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