Date: Sun, 9 Jun 1996 18:23:22 -0400 (EDT) From: Brian Tao <taob@io.org> To: FREEBSD-HACKERS-L <freebsd-hackers@freebsd.org> Subject: Memory leak or reporting problem in 2.2-960501-SNAP? Message-ID: <Pine.NEB.3.92.960609180042.11543D-100000@zap.io.org>
next in thread | raw e-mail | index | archive | help
I noticed a couple of oddities with our newly upgraded 2.2-SNAP machines. One is an apparently huge discrepancy between the amount of real memory used reported by 'top' and from adding up the RSS column in 'ps aux'. For example, on our Web/FTP server (Apache 1.0.3, wu-ftpd 2.4): >>>>> # ps aux | awk '{sum+=$6} END {print sum}' 46104 # top -n 0 load averages: 0.48, 0.71, 0.76 18:10:49 96 processes: 1 running, 95 sleeping Mem: 91M Active, 480K Inact, 18M Wired, 16M Cache, 5862K Buf, 3532K Free Swap: 262M Total, 128K Used, 262M Free <<<<< 'top' says 91M active (there's 128M in this machine), but the numbers from 'ps' barely add up to half that. Our news server shows expected behaviour: >>>>> # ps aux | awk '{sum+=$6} END {print sum}' 105716 # top -n 0 load averages: 0.27, 0.61, 0.57 18:13:30 110 processes: 3 running, 107 sleeping Mem: 68M Active, 2092K Inact, 18M Wired, 40M Cache, 6337K Buf, 176K Free Swap: 262M Total, 128K Used, 262M Free <<<<< I would expect to see the sum of RSS to exceed actual physical RAM usage (particularly on our news server, which makes heavy use of shared memory segments). But to have RSS add up to half the size of what 'top' says? Something seems broken there. The other weirdness I saw this morning was on the abovementioned news server. I'll just reproduce the output of 'top' and 'ps' here, since I have *no* idea what was going on here. I restarted innd with a binary compiled with -g and about half an hour later, the server swapped itself to death. Note the amount of "active memory" as well as innd.debug's RSS size. I rebooted the server and now all seems well, running the same innd.debug binary. >>>>> # top load averages: 0.75, 0.74, 0.67 13:09:57 109 processes: 2 running, 101 sleeping, 6 zombie Cpu states: 3.4% user, 0.0% nice, 20.6% system, 4.9% interrupt, 71.2% idle Mem: 868K Active, 4232K Inact, 20M Wired, 17M Cache, 7196K Buf, 180K Free Swap: 262M Total, 56M Used, 206M Free, 21% Inuse, 408K In, 1860K Out PID USERNAME PRI NICE SIZE RES STATE TIME WCPU CPU COMMAND 23164 news -6 0 296K 192K biowai 0:09 4.46% 4.46% in.nnrpd 22505 news 2 0 296K 96K select 0:02 5.67% 3.97% in.nnrpd 22402 news 30 0 300K 188K RUN 0:27 3.66% 3.66% in.nnrpd 22812 root 30 0 356K 232K RUN 0:06 2.17% 2.17% top 21687 news -18 0 25M 12K swread 3:57 1.79% 1.79% innd.debug 22462 news 2 0 308K 96K sbwait 0:01 0.04% 0.04% in.nnrpd # ps aux USER PID %CPU %MEM VSZ RSS TT STAT STARTED TIME COMMAND news 23164 6.5 0.2 296 192 ?? D 1:05PM 0:10.49 -zot.io.org HE root 2 6.0 0.0 0 12 ?? DL Tue12PM 0:13.26 (pagedaemon) news 22402 4.0 0.2 300 188 ?? D 12:51PM 0:27.33 -zap.io.org HE root 3 2.3 0.0 0 12 ?? DL Tue12PM 2:31.29 (vmdaemon) news 23194 2.0 0.0 0 0 ?? Z - 0:00.00 (in.nnrpd) news 21687 1.7 0.0 24636 12 ?? Ds 12:44PM 3:57.46 (innd.debug) [...] <<<<< -- Brian Tao (BT300, taob@io.org, taob@ican.net) Systems and Network Administrator, Internet Canada Corp. "Though this be madness, yet there is method in't"
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.NEB.3.92.960609180042.11543D-100000>