Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 13 May 2003 08:06:36 +0200
From:      Stijn Hoop <stijn@win.tue.nl>
To:        "Greg 'groggy' Lehey" <grog@FreeBSD.org>
Cc:        freebsd-questions@FreeBSD.org
Subject:   Re: what process is eating my swap? -> SOLVED
Message-ID:  <20030513060636.GA9950@pcwin002.win.tue.nl>
In-Reply-To: <20030513013020.GH39132@wantadilla.lemis.com>
References:  <20030509141200.GC7374@pcwin002.win.tue.nl> <20030512101635.GD20217@pcwin002.win.tue.nl> <20030513013020.GH39132@wantadilla.lemis.com>

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

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

On Tue, May 13, 2003 at 11:00:20AM +0930, Greg 'groggy' Lehey wrote:
> On Monday, 12 May 2003 at 12:16:35 +0200, Stijn Hoop wrote:
> > -> don't _EVER_ build a vinum RAID-5 with a blocksize of 512 bytes (and=
 try
> >    to do something with it)
>=20
> This is good advice, but I don't think it's the cause of your swap
> problem.  Vinum doesn't use *any* swap.  I thought that it was
> possibly something to do with rsync, so I tried it anyway (boy, is it
> slow!), and confirmed that it didn't use any swap.  I did have up to
> 781 concurrently active requests, which could have used a lot of
> kernel memory, but that wouldn't have affected swap.

Yes, that's what I also thought would happen - but somehow kernel memory
made it into swap. Quoting from my original email:

On Fri, 9 May 2003 16:12:00 +0200, Stijn Hoop wrote:
> I tried to use ps's VSZ column (which should be > swap if swap was really
> 99% full, I thought) to determine it, but:
>=20
> [stijn@sandcat] </> ps auxww | grep -v VSZ | awk 'BEGIN {vsz =3D 0} {vsz =
=3D vsz + $5} END {print vsz}'
> 788352

As this machine has 768M of memory and 1536M of swap, how could swap be full
if it didn't hold kernel memory?

> > Actually, that wasn't my intention of course but I forgot to end my
> > plex size While doing the rsync to this RAID-5 it was, I think, the
> > buffer cache that couldn't keep up with the number of blocks vinum
> > had to read/write, and so my virtual memory kept filling up.
>=20
> Buffer cache isn't swap backed.

I guess that doesn't make sense now that I've thought about it :) But I'm
still convinced that something kernel related ate my virtual memory, and
seeing as it doesn't happen again it is very probably this is somehow
related to the 512 byte blocksize.

> > At least, now that I've rebuild the RAID with the proper blocksize,
> > I'm not running into swap space problems anymore.
>=20
> That may just be a coincidence.

My swap is no longer filling up after the RAID rebuild, and the machine
has the same usage pattern it had before -- the only changed parameter is
the vinum RAID blocksize.

> > Greg, does it ever make any sense to build a RAID with a blocksize <
> > 128k?  The manpage says it doesn't;
>=20
> And I wrote the man page :-)

So that's clear then :)

> > maybe vinum could issue a warning while creating such a plex?
>=20
> That's a possibility.

I'll try and come up with a patch if I can find some time and if I can
find the piece of plex creating code (a lot of ifs in there unfortunately).

--Stijn

--=20
I wish there was a knob on the TV to turn up the intelligence.  There's a k=
nob
called `brightness', but it doesn't work."
		-- Gallagher

--7AUc2qLy4jB3hD7Z
Content-Type: application/pgp-signature
Content-Disposition: inline

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

iD8DBQE+wItsY3r/tLQmfWcRAiDBAJ9Yvgp8vq89WDYx+xBCRXG5ZnuqGgCgnC+m
rifpmHNbYL7PWxkNP6NkIz4=
=1lO5
-----END PGP SIGNATURE-----

--7AUc2qLy4jB3hD7Z--



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