2.3.42 buffer problem/leak ?

From: Harald Koenig (koenig@tat.physik.uni-tuebingen.de)
Date: Thu Feb 03 2000 - 04:37:45 EST


using 2.3.42 for some hours I realized that the system was very low
on free memory or buffer space without any obvious reason (ps output below).
where are those 82MB `used' ?? it's not only that the output of `free'
might be bogus, I realized the problem because even small amount of files
haven't been cached any more when running the same `diff ....' command
several times:

-------------------------------------------------------------------------------
             total used free shared buffers cached
Mem: 126596 111448 15148 0 1160 27980
-/+ buffers/cache: 82308 44288
Swap: 82364 0 82364

SysRq: Show Memory
Mem-info:
Free pages: 14756kB ( 0kB HighMem)
( Free: 3689, lru_cache: 7654 (256 512 768) )
  DMA: 136*4kB 8*8kB 1*16kB 1*32kB 1*64kB 1*128kB 1*256kB 1*512kB 1*1024kB 0*2048kB = 2640kB)
  Normal: 1019*4kB 355*8kB 139*16kB 57*32kB 16*64kB 1*128kB 0*256kB 0*512kB 0*1024kB 0*2048kB = 12116kB)
  HighMem: = 0kB)
Swap cache: add 2276, delete 1787, find 674/3186
Free swap: 80128kB
32768 pages of RAM
0 pages of HIGHMEM
1119 reserved pages
8135 pages shared
489 pages swap cached
0 pages in page table cache
Buffer memory: 1096kB
Networking buffers in use : 32
Total network buffer allocations : 1873464
Total failed network buffer allocs : 0
IP fragment buffer size : 0
-------------------------------------------------------------------------------

only after running `eatmem 120M', a small tool to allocate/trash memory,
the situation cleared up and magically I've got a lot of free space again
and files got buffered again:

-------------------------------------------------------------------------------
             total used free shared buffers cached
Mem: 126596 10652 115944 0 312 2344
-/+ buffers/cache: 7996 118600
Swap: 82364 0 82364

Mem-info:
Free pages: 90240kB ( 0kB HighMem)
( Free: 22560, lru_cache: 3383 (256 512 768) )
  DMA: 35*4kB 30*8kB 32*16kB 32*32kB 23*64kB 20*128kB 11*256kB 6*512kB 2*1024kB 0*2048kB = 13884kB)
  Normal: 5*4kB 2*8kB 2*16kB 34*32kB 281*64kB 163*128kB 84*256kB 21*512kB 2*1024kB 1*2048kB = 76356kB)
  HighMem: = 0kB)
Swap cache: add 5082, delete 5082, find 1454/5998
Free swap: 82364kB
32768 pages of RAM
0 pages of HIGHMEM
1119 reserved pages
9360 pages shared
0 pages swap cached
0 pages in page table cache
Buffer memory: 880kB
Networking buffers in use : 35
Total network buffer allocations : 1885942
Total failed network buffer allocs : 0
IP fragment buffer size : 0
-------------------------------------------------------------------------------

I've used 2.3.38/39 for quite a while (but never .40 or .41)
and I've never seen such behaviour before.

here is the output of `ps' before using `eatmem':

-------------------------------------------------------------------------------
# ps axvOT
  PID TTY STAT TIME MAJFL TRS DRS RSS %MEM COMMAND
    1 ? S 0:15 139 330 41 204 0.1 init
    2 ? SW 0:06 0 0 0 0 0.0 [kswapd]
    3 ? SW 0:00 0 0 0 0 0.0 [kflushd]
    4 ? SW 0:00 0 0 0 0 0.0 [kupdate]
    5 ? SW 0:00 0 0 0 0 0.0 [md_thread]
   45 ? SW 0:00 0 0 0 0 0.0 [scsi_eh_1]
  100 ? S 0:00 33 23 1136 316 0.2 /sbin/portmap
  104 ? S 0:00 14 23 1392 324 0.2 /usr/sbin/rpc.ugidd
  112 ? S 0:00 99 27 1448 592 0.4 /usr/sbin/syslogd
  116 ? S 0:00 27 19 1636 896 0.7 /usr/sbin/klogd -c 1
  160 ? S 0:00 85 15 1492 588 0.4 automount -t 300 /misc f
  169 ? S 0:00 32 60 1771 600 0.4 /usr/sbin/rpc.mountd
  172 ? S 0:00 30 62 1785 600 0.4 /usr/sbin/rpc.nfsd
  179 ? S 0:00 9 12 1255 332 0.2 /usr/sbin/atd
  184 ttyS1 S 0:00 19 56 1115 348 0.2 /usr/sbin/gpm -t logi -b
  188 ? S 0:00 66 15 1428 512 0.4 /usr/sbin/inetd
  201 ? S 0:00 25 46 1133 340 0.2 /usr/sbin/lpd
  215 ? S 0:00 129 46 1469 608 0.4 /usr/sbin/lpd
  220 ? S 0:00 25 7 1424 412 0.3 /usr/sbin/rwhod
  225 ? S 0:00 58 364 1875 864 0.6 sendmail: accepting conn
  230 ? S 0:00 18 215 1492 536 0.4 /usr/sbin/sshd -n
  234 ? SL 0:00 322 215 1440 1648 1.3 /usr/sbin/xntpd
  238 ? S 0:00 55 18 1273 584 0.4 /usr/sbin/cron
  242 ? S 0:00 12 24 1435 584 0.4 /usr/sbin/in.identd -e
  243 ? S 0:00 1 24 1435 584 0.4 /usr/sbin/in.identd -e
  244 ? S 0:00 0 24 1435 584 0.4 /usr/sbin/in.identd -e
  245 ? S 0:00 0 24 1435 584 0.4 /usr/sbin/in.identd -e
  246 ? S 0:00 0 24 1435 584 0.4 /usr/sbin/in.identd -e
  247 ? S 0:00 0 24 1435 584 0.4 /usr/sbin/in.identd -e
  248 ? S 0:00 0 24 1435 584 0.4 /usr/sbin/in.identd -e
  257 ? S 0:00 43 30 1409 616 0.4 /usr/sbin/nscd
  259 ? S 0:00 1 30 1409 616 0.4 /usr/sbin/nscd
  260 ? S 0:00 2 30 1409 616 0.4 /usr/sbin/nscd
  261 ? S 0:00 4 30 1409 616 0.4 /usr/sbin/nscd
  262 ? S 0:00 0 30 1409 616 0.4 /usr/sbin/nscd
  263 ? S 0:00 1 30 1409 616 0.4 /usr/sbin/nscd
  264 ? S 0:00 2 30 1409 616 0.4 /usr/sbin/nscd
  281 tty1 S 0:00 345 21 1694 1008 0.7 login -- root
  282 tty2 S 0:00 104 8 1107 428 0.3 /sbin/mingetty tty2
  283 tty3 S 0:00 104 8 1107 428 0.3 /sbin/mingetty tty3
  284 tty4 S 0:00 104 8 1107 428 0.3 /sbin/mingetty tty4
  285 tty5 S 0:00 104 8 1107 428 0.3 /sbin/mingetty tty5
  286 tty6 S 0:00 104 8 1107 428 0.3 /sbin/mingetty tty6
  287 ttyS4 S 0:00 174 29 1454 632 0.4 /usr/sbin/getty ttyS4 19
  291 tty1 S 0:00 294 448 2003 1520 1.2 -bash
13018 tty1 T 0:00 154 76 1419 648 0.5 less
13024 tty1 R 0:00 230 77 2598 1004 0.7 ps axvOT
-------------------------------------------------------------------------------

Harald

-- 
All SCSI disks will from now on                     ___       _____
be required to send an email notice                0--,|    /OOOOOOO\
24 hours prior to complete hardware failure!      <_/  /  /OOOOOOOOOOO\
                                                    \  \/OOOOOOOOOOOOOOO\
                                                      \ OOOOOOOOOOOOOOOOO|//
Harald Koenig,                                         \/\/\/\/\/\/\/\/\/
Inst.f.Theoret.Astrophysik                              //  /     \\  \
koenig@tat.physik.uni-tuebingen.de                     ^^^^^       ^^^^^

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Mon Feb 07 2000 - 21:00:09 EST