what process is eating my swap? -> SOLVED

Stijn Hoop stijn at win.tue.nl
Mon May 12 23:07:35 PDT 2003

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)
> 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:
> [stijn at sandcat] </> ps auxww | grep -v VSZ | awk 'BEGIN {vsz = 0} {vsz = 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.
> 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.
> 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;
> And I wrote the man page :-)

So that's clear then :)

> > maybe vinum could issue a warning while creating such a plex?
> 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).


I wish there was a knob on the TV to turn up the intelligence.  There's a knob
called `brightness', but it doesn't work."
		-- Gallagher
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20030513/3832a5e6/attachment.bin

More information about the freebsd-questions mailing list