Subject: Re: What's in my swap
To: None <current-users@netbsd.org>
From: Martijn van Buul <martijnb@atlas.ipv6.stack.nl>
List: current-users
Date: 08/01/2006 12:36:31
It occurred to me that Greg Troxel wrote in gmane.os.netbsd.current:
> 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.

With some significant fuzz, at that :)

(snipped ps output)

USER       PID %CPU %MEM  VSZ  RSS TTY   STAT STARTED    TIME COMMAND
martijnb 19017  0.0  0.1  460 2556 ?     S     9:21AM 0:01.02 sshd: martijnb@tt
martijnb   301  0.0  0.1  304 2216 ttyp0 Is    2:30PM 0:00.01 -/usr/pkg/bin/zsh
martijnb 10179  0.0  0.1  592 1552 ttyp0 S+    2:34PM 0:00.01 vi /home/martijnb
martijnb 23082  0.0  0.0  176  956 ttyp0 I+    2:34PM 0:00.00 sh -c vi '/home/m
martijnb 23093  0.0  0.2 2440 3712 ttyp0 I+    2:31PM 0:00.09 slrn 
martijnb 23979  0.0  0.0   92  800 ttyp0 R+    2:34PM 0:00.00 ps ux 
martijnb 26727  0.0  0.2 2384 4536 ttyp1 S+   Mon08AM 0:00.82 tf 
martijnb 28875  0.0  0.0  244 2108 ttyp1 IWs  Mon08AM 0:00.01 -/usr/pkg/bin/zsh
martijnb 17638  0.0  0.0  280 2156 ttyp2 IWs  Mon09AM 0:00.01 -/usr/pkg/bin/zsh
martijnb 10789  0.0  0.0  312 2188 ttyp3 IWs   7:52PM 0:00.01 -/usr/pkg/bin/zsh

[more follow]

RSS is *always* bigger than VSZ. This machine isn't swapping right now, but
this would indicate that a process would be significantly swapped out (See
the zsh's) before "VSZ-RSS" even hits 0.