From: leonardz@testarossa.cs.uoguelph.ca (Len Zaifman)
Newsgroups: comp.sys.sgi
Subject: Help with a memory leak
Date: 9 Oct 92 17:20:01 GMT


    We have a 4D380 with  many users on it. There appears to be a memory
leak because the 128 MBytes of memory are fully used ( < 4 MBytes free
and lots of swapping) and yet the memory used , using ps -ef shows < 64
MBytes of memory ( going by the SZ parameter). There should not be a
problem.

    Almost all the programs are fortran so dynamic memory allocation is
not a concern.


    How do we tell what is using the memory and reclaim it. Reboot is
not an option as many jobs have  been running for days.
-- 
						Regards,
						Len Zaifman

Len Zaifman
Information Technology Coordinator, College of Physical and Engineering Science
University of Guelph, Guelph, Ontario. N1G 2W1
phone : (519) 824-4747 xt 6566 
email : leonardz@vm.uoguelph.ca , leonardz@Testarossa.cs.uoguelph.ca


ps : To get the data below we stopped one job to get to the bearable limit. Otherwise, 
swapping turn response time into mud.

From OSVIEW

Osview 2.0 : One Second Average   nic      10/09/92 13:03:23 #8     int=5s
 Load Average        CPU 7 Usage           sync           3    all          994
   1 Min      7.616    %user         87  System Activity       vme            8
   5 Min      7.675    %sys           5    syscall      926  Swap
   15 Min     8.630    %intr          0    read          13    swapin         6
 CPU 0 Usage           %idle          8    write        111    swapout        4
   %user         49  Real Memory           fork           0    bswapin   200.0K
   %sys          13    Phys      128.0M    exec           0    bswapout    2.9M
   %intr          0    Locked      5.1M    readch      1.0K
   %idle         37    Sysdata     4.0K    writech     8.4K
 CPU 1 Usage           Free        4.3M    iget           0
   %user         61    Delwri      4.0K  TCP
   %sys           6    Userdata  118.6M    sndtotal     112
   %intr          3    Freeswap  235.0M    rcvtotal       9
   %idle         31  Virtual Memory        sndbyte     8.7K
 CPU 2 Usage           vfault        80    rcvbyte      519
   %user         98    pfault        74  NetIF[et0]
   %sys           1    demand         0    Ipackets       9
   %intr          0    cw             0    Opackets     112
   %idle          1    steal         74    Ierrors        0
 CPU 3 Usage           onswap         1    Oerrors        0
   %user         83    oncache       77    collisions     0
   %sys           2    onfile         0  NetIF[enp0]
   %intr          0    freed        102    Ipackets       0
   %idle         15    unmodswap      4    Opackets       0
 CPU 4 Usage           unmodfile      8    Ierrors        0
   %user         96  Block Devices         Oerrors        0
   %sys           3    lread      11.1K    collisions     0
   %intr          0    bread      11.1K  NetIF[lo0]
   %idle          2    %rcache      0.0    Ipackets       0
 CPU 5 Usage           lwrite         0    Opackets       0
   %user         95    bwrite         0  Wait Ratio
   %sys           1    %wcache      0.0    %IO          0.3
   %intr          0    phread         0    %Swap        4.5
   %idle          3    phwrite        0    %Physio      0.0
 CPU 6 Usage         TLB Actions         Scheduler
   %user        100    newpid         4    runq           7
   %sys           0    tfault         7    swapq          2
   %intr          0    rfault       711    switch       103
   %idle          0    flush         24  Interrupts


using ps -el I get 

				   SZ  RSS
39 S    0     0     0  1   0 15 *    0:0    8015d260 ?         4:16 sched
 0 S    0     1     0  0  39 15 *   39:0    8015d300 ?         2:32 init
31 R    0     2     0 80   0 15 2    0:0             ?       293:16 vhand
39 S    0     3     0  0  20 15 *    0:0    8015d3a0 ?        58:46 bdflush
 0 S    0   340     1  0  28 15 *   39:0    8015d698 tport     0:00 getty
30 S    0 29551     1  7  26 15 *   45:21   80160980 ?        19:32 portmap
30 S    0   524     1  3  26 15 *  153:14   80160980 ?        64:06 llbd
30 S    0   127     1  0 +39 15 *    0:0    801192c0 ?       354:06 rtnetd
 0 S    0  1233     1  0  26 15 *  853:0    8015d4f4 ?         0:12 sendmail
30 S    0   455     1  0  26 15 *    0:0    8015d558 ?        39:09 nfsd
30 S    0   464     1  0  26 15 *    0:0    801959c0 ?        40:02 biod
30 S    0   463     1  0  26 15 *    0:0    801959c0 ?        39:56 biod
30 S    0   462     1  0  26 15 *    0:0    801959c0 ?        40:08 biod
30 S    0   457   455  0  26 15 *    0:0    8015d558 ?        39:26 nfsd
30 S    0   458   455  0  26 15 *    0:0    8015d558 ?        39:20 nfsd
30 S    0   459   455  0  26 15 *    0:0    8015d558 ?        39:22 nfsd
30 S    0   461     1  0  26 15 *    0:0    801959c0 ?        39:53 biod
 0 S    0  1603     1  0  28 15 *   39:0    8015d710 syscon    0:00 getty
30 R    0  1878  1758  3  56 15 5   89:16            ttyq1     0:00 ps
 0 S    0   300     1  0  26 15 *  110:0    853e9184 ?         0:08 nqsdaemo
 0 S    0   299     1  0  26 15 *   32:0    c0aca67c ?         0:00 logdaemo
 0 S    0   477     1  0  26 15 *   58:0    80160980 ?         0:00 rpc.stat
 0 S    0 29554     1  0  26 15 *   63:0    80160980 ?         0:24 inetd
 0 S    0   441     1  0  26 15 *  117:0    80160980 ?         1:28 named
 0 S    0   500     1  0  26 15 *  947:0    8015d558 ?         0:01 snmpd
 0 S    0   496     1  0  26 15 *  770:0    8015d558 ?         4:45 rwhod
 0 S  110 27361     1  0  39 20 *   79:0    8015d300 ?         0:00 bsb
 0 R  101  1407     1 44 +39 15 *  991:309           ?         4:44 gr_osvie
 0 S    0   301   300  0  26 15 *   83:0    8015d4f4 ?         0:00 netdaemo
 0 S    0   560     1  0  26 15 *   81:0    80160980 ?         0:00 lpd
 0 S    0  1404     1  0  28 15 *   39:0    8015d710 ttyd45    0:00 getty
 0 S    0   483     1  0  26 15 *   76:0    80160980 ?         0:00 rpc.lock
 0 S    0  2355   300  0  29 15 *  110:0    80143174 ?         0:00 nqsdaemo
 0 S    0   744     1  0  26 15 *   65:0    80160980 ?         0:25 syslogd
 0 R  101 23628     1  0  55 15 *  227:30            ?         4:02 xwsh
 0 S    0  1758 23629  0  39 15 *   87:0    8015d300 ttyq1     0:03 csh
30 R  159  2368  2367 80 112 32 5  666:116           ?       4196:53 beet001.
30 S    0 29337 29554  3  26 15 *  776:18   80160980 ?         2:01 rpc.rsta
 0 S    0  2445   300  0  29 15 *  110:0    80144254 ?         0:00 nqsdaemo
 0 S  159  2367  2356  0  29 32 *   36:0    801443bc ?         0:00 sh
 0 S  159  2446  2445  0  39 36 *   79:0    8015d300 ?         0:00 csh
 0 T  110 27882 27870  0 110 30 * 1012:0             ?       608:29 ramn
 0 S  159  2356  2355  0  39 32 *   79:0    8015d300 ?         0:00 csh
30 R  110 27369 27361 80 110 30 0 2650:225           ?       856:07 scf
30 R  190  1633 28283 80 110 30 5  415:58            ?       113:37 n8
 0 S  159  2457  2446  0  29 36 *   36:0    8014549c ?         0:00 sh
30 R  159 12317     1 80 100 20 2  634:4             ?       25972:28 bt.out
30 Z  101 23620 23619  0  61 15                                0:01 <defunct>
30 R  159  2458  2457 80 116 36 1  666:116           ?       3292:17 beet0001
 0 S  101 23619 29554  0  26 15 *   75:0    80160980 ?         0:00 rshd
 0 S  110 27870     1  0  39 20 *   79:0    8015d300 ?         0:00 bsb
 0 S  101 23629 23628  0  39 15 *   88:0    8015d300 ttyq1     0:12 csh
38 S  110  7319  7298 77  20 30 * 2648:88   801bcf88 ?       3463:20 scf
 0 S    0 29418     1  0  26 15 *   62:0    c03de178 ?         0:07 cron
 0 S  190 21302     1  0  29 30 *   36:0    801477c4 ?         0:00 sh
30 R  190  1332 28255 80 110 30 *  415:91            ?       169:25