From owner-freebsd-questions Fri Feb 16 10:33:17 1996 Return-Path: owner-questions Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id KAA22621 for questions-outgoing; Fri, 16 Feb 1996 10:33:17 -0800 (PST) Received: from thing.sunquest.com (thing.Sunquest.COM [149.138.1.11]) by freefall.freebsd.org (8.7.3/8.7.3) with SMTP id KAA22606 for ; Fri, 16 Feb 1996 10:33:05 -0800 (PST) Received: by thing.sunquest.com; id AA20449; Fri, 16 Feb 1996 11:30:38 -0700 Date: Fri, 16 Feb 1996 11:30:38 -0700 From: Tony Jones Message-Id: <9602161830.AA20449@thing.sunquest.com> To: questions@freebsd.org Subject: Where does all the memory go ? Sender: owner-questions@freebsd.org Precedence: bulk ------------------------------------------------------------------ Running FreeBSD 2.05 (3.1.2 XFree86), 32MB ram. Minimum daemons (syslog, portmap, inetd, cron, sendmail, 3 getty's) ------------------------------------------------------------------ Immediately after boot up, log in as root (from xdm). Runs twm and 1 xterm. vmstat shows I have approx 11.2 MB (115xx Kb) on the free list. Sum of the resident set sizes of the running processes = 9.3MB (9564 Kb) That is a total of just over 20MB. Clearly, the kernel takes up some unaccounted for space. Does the UBC also ? or since it is integrated with the VM system, is buffer cache use reflected in the vmstat output ? Just looking for some information on how to better account for memory usage, or to figure for the missing 12MB. Or maybe using PS rss + VMSTAT free + kernel space is not a valid measurement technique ? I guess I was slightly surprised to see only 11MB on the free list in the above situation. Appreciate any comments/education. thanks tony -------------------------------------------------------------------------------- zebedee# ps -auwwx USER PID %CPU %MEM VSZ RSS TT STAT STARTED TIME COMMAND root 6792 2.6 8.3 3200 2556 ?? R 6:27PM 0:02.97 /usr/X11R6/bin/X -auth /usr/X11R6/lib/X11/xdm/A:0-000132 (XF86_S3) root 1 0.0 0.3 432 80 ?? Is 4:34PM 0:00.13 /sbin/init -- root 2 0.0 0.1 0 12 ?? DL 4:34PM 0:00.81 (pagedaemon) root 3 0.0 0.1 0 12 ?? DL 4:34PM 0:00.42 (vmdaemon) root 4 0.0 0.1 0 12 ?? DL 4:34PM 0:01.97 (update) root 65 0.0 0.5 188 160 ?? Ss 4:34PM 0:00.30 syslogd daemon 71 0.0 0.0 176 0 ?? IWs 4:34PM 0:00.01 portmap root 80 0.0 0.2 220 68 ?? Is 4:34PM 0:00.06 inetd root 87 0.0 0.4 272 116 ?? Ss 4:34PM 0:00.16 cron root 90 0.0 0.4 416 108 ?? Is 4:34PM 0:00.03 sendmail: accepting connections (sendmail) root 130 0.0 0.0 156 0 v0 IWs+ 4:34PM 0:00.02 /usr/libexec/getty Pc ttyv0 root 131 0.0 0.0 156 0 v1 IWs+ 4:34PM 0:00.02 /usr/libexec/getty Pc ttyv1 root 132 0.0 1.3 288 392 ?? I 4:34PM 0:00.16 /usr/X11R6/bin/xdm -nodaemon ttyv4 root 524 0.0 0.1 156 12 ?? I 5:04PM 0:00.02 /usr/libexec/getty std.38400q ttyd1 root 6793 0.0 3.4 340 1052 ?? I 6:27PM 0:00.12 -:0 TERM=xterm (xdm) root 6799 0.0 3.1 240 948 ?? I 6:27PM 0:00.06 xconsole -geometry 480x130-0-0 -daemon -notify -verbose -fn fixed -exitOnFail root 6802 0.1 6.1 480 1896 ?? S 6:27PM 0:00.42 xterm -geometry 80x24+10+10 -ls root 6806 0.0 5.9 596 1824 ?? I 6:27PM 0:00.25 twm root 6808 0.0 1.0 464 316 p1 Ss 6:27PM 0:00.12 -csh (csh) root 0 0.0 0.0 0 0 ?? DLs - 0:00.00 (swapper) root 6827 0.0 0.8 444 244 p1 R+ 6:28PM 0:00.01 ps -auwwx total = 9808 [or 9564 if ps -auwwx is discounted] zebedee# vmstat 1 3 procs memory page disks faults cpu r b w avm fre flt re pi po fr sr f0 s1 s2 in sy cs us sy id 2 0 04008916 11540 149 0 0 0 98 19 0 7 0 333 241 43 8 4 88 0 0 04008916 11532 3 0 0 0 0 0 0 0 0 297 42 7 6 2 92 0 0 04013092 11532 1 0 0 0 0 0 0 0 0 306 42 9 3 1 96