who is in swap?

Bill Moran wmoran at collaborativefusion.com
Fri May 20 12:43:42 UTC 2011


In response to Daniel Braniss <danny at cs.huji.ac.il>:

> Hi,
> We have a host, providing mainly http/postgres service, and its
> swap usage is increasing. Is there any way to check which process
> is using swap space? 
> 
> some facts
>   it's running 8.2-stable/amd64
>   has 24gb of memory
>   zfs seems to be ok, arc size too.
>   top says 32G in use, while vmstat avm is around 2G (can't figure this one)
>   top seems to be concervative as to free memory vs. vmstat
>   it's dataless.
> 
> the swap usage is monotonic increasing, but it will take some 20 days
> to exhaust the space, it will hang before that :-( - which
> is what I'm trying to find why

top -o res

Will sort the top display by largest user of memory.  keep in mind that
PostgreSQL can be deceiving because it includes the shared memory in
that display, which is shared by all PG processes and therefore not as
bit a hit as it seems.

That output should allow you to narrow down which process is allocating
so much RAM.

-- 
Bill Moran
Collaborative Fusion Inc.
http://people.collaborativefusion.com/~wmoran/

wmoran at collaborativefusion.com
Phone: 412-422-3463x4023

****************************************************************
IMPORTANT: This message contains confidential information and is
intended only for the individual named. If the reader of this
message is not an intended recipient (or the individual
responsible for the delivery of this message to an intended
recipient), please be advised that any re-use, dissemination,
distribution or copying of this message is prohibited. Please
notify the sender immediately by e-mail if you have received
this e-mail by mistake and delete this e-mail from your system.
E-mail transmission cannot be guaranteed to be secure or
error-free as information could be intercepted, corrupted, lost,
destroyed, arrive late or incomplete, or contain viruses. The
sender therefore does not accept liability for any errors or
omissions in the contents of this message, which arise as a
result of e-mail transmission.
****************************************************************


More information about the freebsd-hackers mailing list