Subject: Re: What's in my swap
To: None <joel@carnat.net>
From: Greg Troxel <gdt@ir.bbn.com>
List: current-users
Date: 08/01/2006 08:08:31
--=-=-=
Content-Transfer-Encoding: quoted-printable


ps alx -k rss
ps alx -k vsz

Look at VSZ and RSS.

From=20ps(1):

     rss     the real memory (resident set) size of the process (in 1024 by=
te
             units).

     vsz         virtual size in Kbytes (alias vsize)


Generally vsz-rss is memory in the address space of a process that
isn't backed by real memory, and thus in swap space, probably with
some fuzz.

In addition, the "W" flag indicates proceses that are swapped out.
Long ago, before VM (e.g., V6, V7, 2.10BSD) this meant that the entire
process memory was in swap space and that the process wasn't
runnable.   I'm unclear if it still means that, or if it's just that
all pages have been paged out.  You'll note that such processes have a
RSS of 4.

On my system (with 1 GB RAM), things like xdm and inetd end up swapped
out when they don't wake up for a long time.

=2D-=20
    Greg Troxel <gdt@ir.bbn.com>

--=-=-=
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.4 (NetBSD)

iD8DBQFEz0Q/+vesoDJhHiURAsJIAKCUse27cM9wiZLD+MUAdwhHbRp/+wCfbyet
+5HrKeyr3SqDyzzljryQLYI=
=aUvg
-----END PGP SIGNATURE-----
--=-=-=--