what process is eating my swap? -> SOLVED

Stijn Hoop stijn at win.tue.nl
Mon May 12 03:17:38 PDT 2003


On Fri, May 09, 2003 at 04:12:00PM +0200, Stijn Hoop wrote:
> My swapspace is 99% used, but I can't find a way to figure out what process is
> using it. top & ps don't seem to list swap usage of processes, and systat
> -swap only lists the fact that 99% is in use.

[snip]

> - I'm using vinum for two RAID-5 arrays on 8 ATA disks, and was
>   rsync'ing from one to the other at the time the kernel complained
>   about lack of swapspace:
> 
> [stijn at sandcat] </> dmesg | grep swap
> swap_pager_getswapspace: failed
> pid 33932 (rsync), uid 0, was killed: out of swap space
> 
>   Could vinum somehow 'leak' swap space? My swap partition is on a regular
>   SCSI disk, not on a vinum volume, so this seems farfetched but I'm a bit
>   at a loss here.
> 
> Anyone have any clue? I need to have a bit of virtual memory on this
> machine...

I figured it out, and I thought I'd let you know what the problem was:

-> don't _EVER_ build a vinum RAID-5 with a blocksize of 512 bytes (and try
   to do something with it)

Actually, that wasn't my intention of course but I forgot to end my plex size
with a 'k'.

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.

At least, now that I've rebuild the RAID with the proper blocksize, I'm not
running into swap space problems anymore.

Greg, does it ever make any sense to build a RAID with a blocksize < 128k?
The manpage says it doesn't; maybe vinum could issue a warning while
creating such a plex? The output of ls tells you that the subdisks are
at offsets of 512 B <ytes> of course, but the missing 'k' is rather hard
to spot.

I'm off to shoot myself in the foot somewhere else then...

--Stijn

-- 
Fairy tales do not tell children that dragons exist. Children already
know dragons exist. Fairy tales tell children the dragons can be
killed.
		-- G.K. Chesterton
-------------- 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/20030512/b79f170e/attachment.bin


More information about the freebsd-questions mailing list