Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 14 Apr 1995 05:19:38 -0700
From:      Faried Nawaz <fn@pain.csrv.uidaho.edu>
To:        questions@freefall.cdrom.com
Subject:   [2.0R] news server memleak?
Message-ID:  <199504141219.FAA26956@crow.csrv.uidaho.edu>

next in thread | raw e-mail | index | archive | help
hello,

i have a freebsd machine that acts as the news server for my campus.
i'm running inn1.4 (from the ports) on a micron p90 and 2.0-RELEASE.
i've installed a few patches to speed up innxmit, innd, etc...nothing
unusual.  it has 32mb ram; i reserved 128mb for swap (though i've never
seen it above 30 or so); it has a simple vga video card and has two vtys.
the scsi controller is a bt946c; the drives are a 500mb quantum and a
2gig barracuda.

the machine & os appear to do quite well -- they've impressed my employers.
i've seen 20+ day uptimes; its response is quite spiffy, and it even managed
to impress the local novell dude (mainly due to the install disks :).

i've noticed a strange thing, though, and it puzzles me.  yesterday (18 day
uptime) i noticed that the machine was living in swap.  it had innd running
(ps said vsz was around 7.5mb), and had a few in.nnrpds running (ps said
vsz for each was just over a meg).  i could not see how it all added up
to > 20mb, but i was 10mb into swap.

last night (a few hours ago, actually), i shutdown innd, kill -15'd the
few running nnrpds, and...found myself 3mb into swap.  i ran a few
commands, and i produce their output below.  i'm not quite sure how to
interpret the results (or even if i was using the right commands to
pinpoint the problem), though.  help?

(
uptime is 19 days, 3 hours at the time of recording.
kern.maxvnodes = 2188
kern.maxproc   = 1044
kern.maxfiles  = 3404
hw.physmem     = 33161216
hw.usermem     = 26656768

maxusers (in the kernel config file) is set to 64.
i changed CHILD_MAX in /sys/sys/syslimits to 125; news couldn't fork
a lot of nnrpds...and this is a large campus (is there a better way?).
)

Script started on Fri Apr 14 04:40:34 1995
//newshound~# pstat -T
 72/3404 files
   2186 vnodes
3M/128M swap space
//newshound~# swapinfo -k
Device      1K-blocks       Used  Available   Capacity
/dev/sd0b      131072       3668     127404       3%
//newshound~# vmstat -s
140205270 cpu context switches
517500840 device interrupts
 47827105 software interrupts
 27898289 traps
201589844 system calls
   246510 swap pager pageins
   619884 swap pager pages paged in
   307442 swap pager pageouts
   782911 swap pager pages paged out
   127496 vnode pager pageins
   487600 vnode pager pages paged in
        0 vnode pager pageouts
        0 vnode pager pages paged out
 43640656 VM object cache lookups
 43065520 VM object hits
    61694 page daemon wakeups
 50238478 pages examined by the page daemon
   502501 pages reactivated
    28207 intransit blocking page faults
447946629 zero fill pages allocated
  9533202 zero fill pages zeroed
  4553831 copy-on-write faults
 28647694 total VM faults taken
 32189702 pages freed
  1017555 pages freed by daemon
 12739142 pages freed by exiting processes
     1289 pages active
      187 pages inactive
     1657 pages wired down
     4498 pages free
     4096 bytes per page
 50747622 total name lookups
          cache hits (46% pos + 0% neg) system 27% per-process
          deletions 0%, falsehits 0%, toolong 0%
//newshound~# vmstat -m
Memory statistics by bucket size
Size   In Use   Free   Requests  HighWater  Couldfree
  16     1162    630   23571935    1280          0
  32     1372   3748   13270541     640          0
  64     2369   2111   19052481     320      57528
 128     3343   1425  173047271     160          0
 256     2257    575   25081958      80          0
 512       18      6       1673      40          0
  1K        8     60   27976272      20   17931306
  2K        7      9        126      10          0
  4K        8      2         48       5          0
  8K        4      5       5561       5          0
 16K        0      0          8       5          0

Memory usage type by bucket size
Size  Type(s)
  16  devbuf, routetbl, vnodes, VM objhash, VM pgdata, proc, temp
  32  devbuf, pcb, routetbl, pgrp, session, VM mapent, VM pager, VM pgdata,
	  subproc, LFS segment, in_multi, ether_multi, temp
  64  devbuf, routetbl, ifaddr, namecache, VM pgdata, file, lockf,
	  LFS segment, temp
 128  mbuf, devbuf, pcb, routetbl, fragtbl, zombie, ifaddr, soopts, cred,
	  vnodes, VM map, VM object, VM pgdata, file desc, temp, ttys
 256  devbuf, socket, pcb, vnodes, VM map, VM pgdata, file desc, proc,
	  subproc, FFS node, temp
 512  mbuf, ioctlops, mount, UFS mount, VM pgdata, file desc, temp
  1K  devbuf, namei, UFS mount, VM pgdata, temp
  2K  devbuf, UFS mount, VM pgdata, ttys
  4K  devbuf, ioctlops, VM pgdata
  8K  namecache, UFS quota, UFS mount, VM pgdata, temp
 16K  VM pgdata

Memory statistics by type                          Type  Kern
        Type  InUse MemUse HighUse  Limit Requests Limit Limit Size(s)
         mbuf    21     3K     52K  9831K155026281    0     0  128,512
       devbuf    15    37K     45K  9831K       63    0     0  16,32,64,128,256,1K,2K,4K
       socket    41    11K     63K  9831K   326097    0     0  256
          pcb    62    11K     47K  9831K   407614    0     0  32,128,256
     routetbl   190    15K     16K  9831K    42522    0     0  16,32,64,128
      fragtbl     0     0K      1K  9831K        8    0     0  128
       zombie     0     0K      1K  9831K   260182    0     0  128
       ifaddr     6     1K      1K  9831K        6    0     0  64,128
       soopts     2     1K      1K  9831K     7048    0     0  128
        namei     0     0K     12K  9831K 27971963    0     0  1K
     ioctlops     0     0K      4K  9831K        5    0     0  512,4K
         cred     8     1K     11K  9831K    54477    0     0  128
         pgrp    15     1K      1K  9831K    10303    0     0  32
      session    12     1K      1K  9831K     8223    0     0  32
        mount     5     3K      3K  9831K        5    0     0  512
       vnodes  2214   276K    282K  9831K    11091    0     0  16,128,256
    namecache  2189   145K    145K  9831K     2189    0     0  64,8K
    UFS quota     1     8K      8K  9831K        1    0     0  8K
    UFS mount    13    23K     23K  9831K       13    0     0  512,1K,2K,8K
       VM map    24     6K     25K  9831K  1449934    0     0  128,256
    VM mapent   325    11K     52K  9831K   262009    0     0  32
    VM object   833   105K    223K  9831K 15784314    0     0  128
   VM objhash   569     9K     11K  9831K 11781486    0     0  16
     VM pager   704    22K     45K  9831K 12093352    0     0  32
    VM pgdata   839    35K    178K  9831K 12405218    0     0  16,32,64,128,256,512,1K,2K,4K,8K,16K
         file    72     5K     27K  9831K 15671661    0     0  64
    file desc    25     5K     20K  9831K   262991    0     0  128,256,512
        lockf     1     1K      1K  9831K  2692926    0     0  64
         proc    23     6K     24K  9831K   260264    0     0  16,256
      subproc    19     1K      3K  9831K   260829    0     0  32,256
  LFS segment     0     0K      4K  9831K   795729    0     0  32,64
     FFS node  2117   530K    547K  9831K 24148614    0     0  256
     in_multi     2     1K      1K  9831K        2    0     0  32
  ether_multi     1     1K      1K  9831K        1    0     0  32
         temp    99    11K     27K  9831K     8896    0     0  16,32,64,128,256,512,1K,8K
         ttys   101    15K     16K  9831K     1561    0     0  128,2K

Memory Totals:  In Use    Free    Requests
                 1287K    710K    282007878
//newshound~# top -b
load averages:  0.00,  0.02,  0.00    04:40:47
17 processes:  1 running, 16 sleeping

Memory: Real: 1048K/13276K Virt: 36160K/317024K Free: 17992K


  PID USERNAME PRI NICE   SIZE   RES STATE   TIME   WCPU    CPU COMMAND
21045 root      18    0   872K  944K sleep   0:00  0.20%  0.10% bash
   66 root       2    0   192K  184K sleep   3:58  0.05%  0.05% routed
21050 root      30    0   292K  684K run     0:00  0.00%  0.00% top
20943 root       2    0   204K  512K sleep   0:00  0.00%  0.00% rlogind
20955 root      18    0   876K  920K sleep   0:00  0.00%  0.00% bash
20944 fn        18    0   440K  264K sleep   0:00  0.00%  0.00% csh
   59 root      18    0   376K  220K sleep   0:58  0.00%  0.00% cron
    1 root      10    0   404K   72K sleep   0:02  0.00%  0.00% init
21043 root       3    0   220K  472K sleep   0:00  0.00%  0.00% script
21044 root       3    0   220K  236K sleep   0:00  0.00%  0.00% script
29861 root       3    0   152K  228K sleep   0:00  0.00%  0.00% getty
21641 root       3    0   152K  228K sleep   0:00  0.00%  0.00% getty
   69 root       2    0   840K  784K sleep   3:02  0.00%  0.00% named
   48 root       2    0   192K  304K sleep  12:53  0.00%  0.00% syslogd
   62 daemon     2    0   204K  272K sleep   0:01  0.00%  0.00% portmap

//newshound~# vmstat
 procs   memory     page                    disks      faults      cpu
 r b w   avm   fre  flt  re  pi  po  fr  sr f0 s0 s1   in   sy  cs us sy id
 1 0 0 36052 17976   17   0   0   0  19  30  0  4 29  313  122  85  3  3 94
//newshound~# ps alxww
  UID   PID  PPID CPU PRI NI   VSZ  RSS WCHAN  STAT TT       TIME COMMAND
    0     0     0   0 -18  0     0    0 sched  DLs  ??    0:00.00 (swapper)
    0     1     0   0  10  0   404   72 wait   Is   ??    0:02.30 /sbin/init -- 
    0     2     0  19 -18  0     0   12 psleep DL   ??   10:08.63 (pagedaemon)
    0     3     0   0  -6  0     0   12 update DL   ??   16:24.08 (update)
    0    48     1   0   2  0   192  304 select Ss   ??   12:53.59 syslogd 
    0    59     1   0  18  0   376  220 pause  Is   ??    0:58.16 cron 
    1    62     1   0   2  0   204  272 select Is   ??    0:01.37 portmap 
    0    66     1   0   2  0   192  184 select Ss   ??    3:58.80 routed -q 
    0    69     1   0   2  0   840  784 select Is   ??    3:02.48 named 
    0    82     1   0   2  0   424  232 netcon Is   ??    0:06.81 sendmail: accepting connections (sendmail)
    0    85     1   0   2  0   244  268 select Is   ??    0:02.15 inetd 
    0 20943    85   0   2  0   204  512 select S    ??    0:00.74 rlogind 
 1001 20944 20943   0  18  0   440  264 pause  Is   p0    0:00.17 -csh (csh)
    0 20955 20944   0  18  0   876  920 pause  S    p0    0:00.93 -su (bash)
    0 21043 20955   0   3  0   220  472 ttyin  S+   p0    0:00.05 script 
    0 21044 21043   0   3  0   220  236 ttyin  S+   p0    0:00.03 script 
    0 21045 21044   1  18  0   872  944 pause  Ss   p1    0:00.16 sh -i (bash)
    0 21052 21045   2  28  0   436  240 -      R+   p1    0:00.00 ps alxww 
    0 21641     1   6   3  0   152  228 ttyin  Is+  v0    0:00.41 /usr/libexec/getty Pc ttyv0 
    0 29861     1   2   3  0   152  228 ttyin  Is+  v1    0:00.08 /usr/libexec/getty Pc ttyv1 
//newshound~# exit
exit

Script done on Fri Apr 14 04:41:02 1995



thanks for your time,

faried.

--
fn@uidaho.edu
fn::=`faried nawaz`, uidaho::=`university of idaho, moscow, id 83844`,
disclaimer::=`my parents, bosses, and friends may or may not agree with
this message`.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199504141219.FAA26956>