virtual memory management

Kris Kennaway kris at obsecurity.org
Sat Jan 20 08:04:22 UTC 2007


On Sat, Jan 20, 2007 at 08:57:27AM +0100, Zbigniew Szalbot wrote:
> Dear all,
> 
> Is there a FBSD command to manage virtual memory? I think my swap size is
> now a bit too much used:
> 
> last pid: 19824;  load averages:  0.06,  0.05,  0.02   up 50+10:00:17 
> 08:54:00
> 230 processes: 1 running, 227 sleeping, 2 zombie
> CPU states:  0.0% user,  0.0% nice,  0.4% system,  0.8% interrupt, 98.8% idle
> Mem: 232M Active, 27M Inact, 91M Wired, 212K Cache, 60M Buf, 142M Free
> Swap: 512M Total, 482M Used, 29M Free, 94% Inuse
> 
> The swap size usage grow so big probably because I started wget to
> download an iso image and then WinSCP to grab it from the FBSD machine to
> my laptop. When I started wget, the swap usage was around 19% and had been
> like that for many days.

That should not cause such a thing (wget does not try to fit the whole
file in memory, so it won't be pushing stuff out to swap).  Look at
the process sizes in top to see what is using the swap space -
something(s) that is still running is using that 482MB.

Probably you have one or more processes that are using a large amount
of virtual memory, which is too big to fit in RAM.  That's the
situation you need to address.

> Is there any way to handle swap size usage other than restarting the box?

kill(1).

Kris
-------------- 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/20070120/73c2e32f/attachment.pgp


More information about the freebsd-questions mailing list