Subject: Re: Why am I using this much swap ?
To: Chris G. Demetriou <>
From: Dirk Steinberg <>
List: current-users
Date: 03/04/1994 08:41:46
>>>>> "Chris" == Chris G Demetriou <> writes:

    >> If there a swap leak somewhere:
    Chris> then you certainly couldn't tell from what you sent...  8-)

Why not?

    > $ swapinfo
    > Device      512-blocks       Used  Available   Capacity
    > /dev/sd0b        90720      86728       3992      96%
    > /dev/wd0b            0  *** not available for swapping ***

    Chris> OK, that's 43M of swap used.

    Chris> summing the VSZ of your processes, you get: 61272k of VM
    Chris> used.

But the VSZ of mfs usually doesn't count like this. On a freshly
rebooted machine the VSZ of mfs is equal to the swap space (and stays
like this forever), but the actual VM usage is close to zero. That's
what mfs (or Sun's tmpfs, for that matter) is all about. If it were to
use 45 MB VM all the time, it'd be pretty useless. So Peter's VM used
is 61272k - 45500k + x = 15772k + x, where x is `du -sk /tmp`.

    Chris> how much RAM does your machine have?  (i'd bet 32M...)

You don't have to bet:

root        16  0.0 40.0 45500 13100 ??  Is   Tue07PM    0:23.59 mfs /dev/sd0b /

Real_mem = RSS / %MEM = 13100k / 0.40 = 327500k =~ 32 MB.

    >> Normally the system start and there is hardly any swap
    >> use... and where is the 13Mb or so going in MFS ???

    Chris> had you recently done something large that would use MFS?

I also suspect that this might be the reason. But mfs should free it's
VM after use; maybe it doesn't. That could be the bug.

    Chris> (also, why did you include the ls of /tmp?

Because that's relevant for mfs's VM useage.

    Chris> vi.recover should be in /var/tmp, you know...  

That's Peter's problem, he'll never be able to use vi.recover when it
is on mfs /tmp......

    Chris> also, you never said where the mfs was mounted...)

I assume /tmp, of course. I always do that, too.

    Chris> cgd


PS: Peter: Are you refering to NetBSD/i386 or to NetBSD/sparc?

Dirk W. Steinberg - RWTH Aachen - Internet email:
Aachen University of Technology / IS2-Integrated Systems in Signal Processing
Rhein.Westf.Tech.Hochsch. Aachen / Integrierte Systeme der Signalverarbeitung
Templergraben 55 / D-52056 Aachen / phone:+49 241 807879 / fax:+49 241 807631
Home address: Kleikstr. 63, D-52134 Herzogenrath,Germany/phone: +49 2406 7225