"resident" memory or "rss" numbers

Albert D. Cahalan (acahalan@cs.uml.edu)
Sun, 14 Nov 1999 22:25:19 -0500 (EST)


The second value in /proc/*/statm (in pages) is nearly identical
to the VmRSS value found in /proc/*/status (in kB). They don't
quite match though. One difference is video memory mapped by X.
I'd like to know what else causes a difference.

Consider this output from a hacked ps:

$ ps h -eo diff,rss,resident,pid,args | sort | colrm 80 | tail -40
0 352 88 23335 xterm
0 368 92 25344 xterm
0 368 92 25365 xterm
0 368 92 29270 nxterm
0 396 99 2849 xterm
0 396 99 3630 xterm
0 396 99 18867 -bash
0 396 99 32666 nxterm
0 408 102 25285 xterm
0 468 117 25286 bash
0 516 129 3028 bash
0 528 132 18864 bash
0 536 134 18855 xterm
0 544 136 25888 bash
0 552 138 1017 bash
0 552 138 4874 -bash
0 576 144 3644 bash
0 596 149 5701 pppd call uml
0 656 164 18760 fvwm95 -cmd FvwmM4 -debug /etc/X11/AnotherLevel/fvwm2rc.m
0 700 175 5709 ssh -e none -l acahalan -x jupiter
0 780 195 1016 xterm
0 900 225 18863 xterm
0 1120 280 3027 nxterm
0 1220 305 5417 bash
0 1228 307 5043 bash
0 1244 311 3955 xterm
0 1252 313 3643 xterm
0 1596 399 5042 xterm
0 1688 422 25887 xterm
0 2116 529 5416 xterm
4 0 1 28767 [less]
4 276 70 29272 joe
4 280 71 28210 joe treewalk.c
4 540 136 5716 less top.c.rej
4 792 199 5048 joe notes
4 876 220 5725 ./ps h -eo diff,rss,resident,pid,args
12 368 95 18832 xload -nolabel -geometry 32x20+0+0 -bg grey60 -update 5
76 272 87 4088 [netscape-commun]
144 20552 5174 4078 /usr/lib/netscape/netscape-communicator
8260 16360 6155 18757 /usr/X11R6/bin/Xwrapper :0 -bpp 32

That first column is the difference in kB. Normally it is 0.
Why is it that joe, less, ps, xload, and netscape are non-0?

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/