Date: Sun, 18 Feb 1996 13:40:46 -0800 (PST) From: Paul Traina <pst@Shockwave.COM> To: questions@freebsd.org Cc: davidg@freebsd.org Subject: making heads or tails of shared library memory utilization? Message-ID: <199602182140.NAA00503@precipice.shockwave.com>
next in thread | raw e-mail | index | archive | help
I've started playing around shared library versions of Tk/Tcl for a pet
project that will involve several dozen wish processes running. I wanted
to get a good feel for how shared memory utilization works before I got too
deep into things, so I started looking at my system.
As an example, here's the output from:
pst@precipice$ ps -ax -Orss,rsz,vsz,%mem,tsiz
PID RSS RSZ VSZ %MEM TSIZ TT STAT TIME COMMAND
0 0 0 0 0.1 0 ?? DLs 0:00.01 (swapper)
1 60 60 412 0.5 148 ?? Is 0:00.04 /sbin/init --
2 12 12 0 0.1 0 ?? DL 0:01.27 (pagedaemon)
3 12 12 0 0.1 0 ?? DL 0:00.03 (vmdaemon)
4 12 12 0 0.1 0 ?? DL 0:00.14 (update)
29 16 16 200 0.2 48 ?? Is 0:00.01 adjkerntz -i
53 92 92 312 0.7 112 ?? Rs 0:00.06 rdisc -s
79 224 224 196 1.6 20 ?? Ss 0:00.20 syslogd
82 324 324 1180 2.3 112 ?? Is 0:00.06 named -b /etc/namedb/named.
94 128 128 176 1.0 12 ?? Is 0:00.01 portmap
104 176 176 196 1.3 20 ?? Is 0:00.54 inetd
111 300 300 236 2.2 24 ?? Is 0:00.10 cron
114 172 172 200 1.3 40 ?? Is 0:00.05 lpd
118 156 156 512 1.1 248 ?? Is 0:00.02 sendmail: accepting connect
158 200 200 556 1.5 348 ?? Is 0:00.04 faxq
162 356 356 284 2.6 88 ?? I 0:00.72 xdm
167 212 212 316 1.5 120 ?? Is 0:08.46 sshd
172 304 304 692 2.2 476 ?? I 0:00.20 /usr/local/sbin/faxgetty -d
173 6036 6036 2580 42.3 376 ?? S 0:10.95 /usr/X11R6/lib/X11/Accelera
186 740 740 336 5.2 88 ?? I 0:00.19 -:0 (xdm)
196 200 200 492 1.5 288 ?? I 0:00.29 /bin/sh /home/precipice/pst
238 860 860 372 6.1 116 ?? I 0:00.39 fvwm
242 700 700 244 5.0 28 ?? I 0:00.25 GoodStuff 8 4 /tmp/fvwmrc00
246 1136 1136 212 8.0 12 ?? S 0:00.20 xclock
247 756 756 236 5.4 32 ?? I 0:00.19 FvwmPager 11 4 /tmp/fvwmrc0
254 1588 1588 576 11.2 128 ?? R 0:01.75 xterm
255 1508 1508 576 10.6 128 ?? I 0:00.42 xterm
266 816 816 644 5.8 300 p0 Is+ 0:00.15 bash
267 832 832 644 5.9 300 p1 Ss 0:00.52 bash
389 252 252 456 1.8 160 p1 R+ 0:00.00 ps -ax -Orss
169 248 248 156 1.8 16 v0 Is+ 0:00.03 /usr/libexec/getty Pc ttyv0
170 248 248 156 1.8 16 v1 Is+ 0:00.03 /usr/libexec/getty Pc ttyv1
171 248 248 156 1.8 16 v2 Is+ 0:00.03 /usr/libexec/getty Pc ttyv2
Let's look at the two xterm processes for a second.
PID RSS RSZ VSZ %MEM TSIZ TT STAT TIME COMMAND
254 1588 1588 576 11.2 128 ?? R 0:01.75 xterm
255 1508 1508 576 10.6 128 ?? I 0:00.42 xterm
Now, I'm *hoping* (assuming?) that the resident set sizes (RSS/RSZ) include
aliased memory from pulling in the shared libc, X libraries, and text segments,
so in fact, these two processes, combined, are not using 3mb of memory on
xterms but rather just the amount of udata and idata each process requires
and a one-time-charge against system memory for libc, X libraries, and the
text segments.
How do I confirm this and figure out what real memory each process requires
and how much of a win I'm getting from shared objects and text segments?
Paul
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199602182140.NAA00503>
