Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 8 Jun 2006 09:59:01 -0400
From:      Kris Kennaway <kris@obsecurity.org>
To:        Andrea Venturoli <ml.diespammer@netfence.it>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Strange swap behaviour
Message-ID:  <20060608135901.GA71080@xor.obsecurity.org>
In-Reply-To: <4487DAAE.3040703@netfence.it>
References:  <4487DAAE.3040703@netfence.it>

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

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

On Thu, Jun 08, 2006 at 10:07:10AM +0200, Andrea Venturoli wrote:
> Hello.
>=20
> A server of mine is running 6.1/amd64 with 1GiB of RAM.
> From time to time swap use will grow enormously and performance will=20
> suffer from this; also the nightly clamav run will not complete, as the=
=20
> process will get killed due to lack of swap space.
> The day after I'll look into top and see this two processes are the=20
> largest ones:
> >  672 snort          1 -58    0  4007M 62344K bpf    0   8:53  0.00% sno=
rt
> >  669 snort          1 -58    0   323M 29704K bpf    1   1:45  0.00% sno=
rt
>=20
> I kill them and start them again; I get:
>=20
> >10295 snort          1 -58    0 81708K 66432K bpf    0   0:01 12.38% sno=
rt
> >10283 snort          1 -58    0 81704K 66368K bpf    0   0:01  5.77% sno=
rt
>=20
>=20
> However swap utilization will drop from 4095/4096 MiB to 136/4096 MiB.
>=20
> Is this normal?

Yes.

> Does the size figure in top only show physical RAM usage?

No, that is what the 'res' field (resident size) shows.

> Or is only swap space reclaimed after the process gets killed?

It's reclaimed when the process releases the memory, which is either
when it decides to stop hogging so much VM or when you kill it.

Kris

--y0ulUmNC+osPPQO6
Content-Type: application/pgp-signature
Content-Disposition: inline

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

iD8DBQFEiC0kWry0BWjoQKURAmQqAKCU5zaBcqEKKKR4jAXzkN2f6O3+vwCg4LUS
VgFwQ/4R6NYfCt8UqpX80DE=
=k+Qt
-----END PGP SIGNATURE-----

--y0ulUmNC+osPPQO6--



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