Subject: Memory leak?
To: None <current-users@netbsd.org, tech-kern@netbsd.org>
From: Lennart Augustsson <lennart@augustsson.net>
List: tech-kern
Date: 11/17/1999 19:11:50
This is a multi-part message in MIME format.
--------------3F6900A7D6A27BA18719A89F
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
For the last two days my machine has started to behave like there
is a kernel memory leak.
The symptom is that there is less and less free memory available, and
more and more programs are swapped out.
Here is what top says:
Memory: 24M Act, 10M Inact, 240K Wired, 404K Free, 28M Swap, 348M Swap free
This machine has 128M memory, adding up what's in use there seems
to be about 90M that is unaccounted for.
I've attached the output of `vmstat -m'. The problems started after the
soft-dep changes were merged in. I have the SOFTDEP option defined, but
I've not turned it on for any file system.
It could be totally unrelated to soft-dep; that's just when I rebooted.
The pmap changes happened around the same time.
Has anyone else seen this? Any clues to what might be wrong?
--
-- Lennart
--------------3F6900A7D6A27BA18719A89F
Content-Type: text/plain; charset=us-ascii;
name="vmout"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="vmout"
Memory statistics by bucket size
Size In Use Free Requests HighWater Couldfree
16 919 361 1609082 1280 0
32 613 411 756968 640 110
64 12546 62 1591446 320 808
128 437 43 1073491 160 0
256 613 251 1002239 80 352
512 272 48 55316 40 2208
1024 190 54 2945206 20 707591
2048 20 14 14359 10 269
4096 40 13 10883 5 4927
8192 21 7 6056 5 2679
16384 1 0 5037 5 0
32768 0 0 1916 5 0
65536 6 0 6 5 0
131072 5 0 5 5 0
262144 1 0 1 5 0
Memory usage type by bucket size
Size Type(s)
16 devbuf, pcb, routetbl, soname, namecache, shm, proc, exec,
miscfs mount, VM swap, UVM amap, UVM aobj, temp, USB, USB device,
USB HC
32 devbuf, pcb, routetbl, fragtbl, ifaddr, soname, NFS req, vnodes,
LFS segment, ether_multi, VM swap, UVM amap, UVM aobj, temp, USB,
USB device, USB HC
64 devbuf, pcb, routetbl, ifaddr, session, NFS req, lockf, LFS segment,
MFS node, in_multi, NFS diroff, UVM amap, UVM aobj, temp, DMA map,
USB, USB device, USB HC
128 devbuf, routetbl, ifaddr, soname, cred, file desc, ttys, exec,
UVM amap, UVM aobj, temp, USB, USB device
256 devbuf, ifaddr, vnodes, shm, VM map, file desc, proc, Export Host,
NFS srvsock, NFS daemon, exec, NFS diroff, VM swap, UVM amap,
UVM aobj, temp, DMA map, USB, USB device, Pool, newblk
512 devbuf, pcb, ioctlops, mount, namecache, UFS mount, NFS daemon,
MSDOSFS mount, UVM amap, temp, DMA map, USB, USB device, NTFS
1024 devbuf, namei, ioctlops, NFS mount, proc, NQNFS Lease, ttys, exec,
UVM amap, UVM aobj, temp, pagedep
2048 devbuf, ifaddr, ioctlops, UFS mount, MSDOSFS mount, UVM amap, temp
4096 devbuf, ioctlops, NFS node, namecache, UFS mount, ISOFS mount,
UVM amap, temp, NTFS, inodedep
8192 devbuf, namecache, UFS mount, MSDOSFS fat, UVM amap, temp
16384 UFS mount, UVM amap
32768 UVM amap
65536 devbuf
131072 MSDOSFS fat, UVM amap
262144 VM page bucket
Memory statistics by type Type Kern
Type InUse MemUse HighUse Limit Requests Limit Limit Size(s)
devbuf 242 500K 500K 3687K 262 0 0 16,32,64,128,256,512,1024,2048,4096,8192,65536
pcb 49 5K 6K 3687K 79262 0 0 16,32,64,512
routetbl 15 2K 2K 3687K 17 0 0 16,32,64,128
fragtbl 0 0K 1K 3687K 55205 0 0 32
ifaddr 20 5K 5K 3687K 22 0 0 32,64,128,256,2048
soname 15 1K 1K 3687K 242 0 0 16,32,128
namei 0 0K 9K 3687K 2768042 0 0 1024
ioctlops 0 0K 4K 3687K 172 0 0 512,1024,2048,4096
cred 24 3K 4K 3687K 10903 0 0 128
session 33 3K 3K 3687K 180 0 0 64
mount 16 8K 8K 3687K 21 0 0 512
NFS req 0 0K 1K 3687K 604820 0 0 32,64
NFS mount 7 7K 7K 3687K 7 0 0 1024
NFS node 1 4K 4K 3687K 1 0 0 4096
vnodes 419 20K 32K 3687K 2084 0 0 32,256
namecache 4 13K 13K 3687K 4 0 0 16,512,4096,8192
UFS mount 16 57K 57K 3687K 16 0 0 512,2048,4096,8192,16384
shm 3 1K 2K 3687K 6312 0 0 16,256
VM map 4 1K 1K 3687K 4 0 0 256
file desc 49 7K 10K 3687K 112450 0 0 128,256
lockf 3 1K 1K 3687K 39 0 0 64
proc 5 3K 3K 3687K 5 0 0 16,256,1024
LFS segment 0 0K 1K 3687K 914 0 0 32,64
MFS node 1 1K 1K 3687K 1 0 0 64
NQNFS Lease 1 1K 1K 3687K 1 0 0 1024
Export Host 8 2K 2K 3687K 8 0 0 256
NFS srvsock 2 1K 1K 3687K 2 0 0 256
NFS daemon 5 3K 3K 3687K 5 0 0 256,512
in_multi 2 1K 1K 3687K 2 0 0 64
ether_multi 1 1K 1K 3687K 1 0 0 32
ISOFS mount 1 4K 4K 3687K 1 0 0 4096
MSDOSFS mount 3 3K 3K 3687K 4 0 0 512,2048
MSDOSFS fat 2 120K 120K 3687K 2 0 0 8192,131072
ttys 196 128K 128K 3687K 196 0 0 128,1024
exec 0 0K 2K 3687K 333803 0 0 16,128,256,1024
miscfs mount 1 1K 1K 3687K 1 0 0 16
NFS diroff 12179 842K 847K 3687K 30792 0 0 64,256
VM swap 10 1K 1K 3687K 11 0 0 16,32,256
VM page bucket 1 256K 256K 3687K 1 0 0 262144
UVM amap 1928 650K 776K 3687K 4630759 0 0 16,32,64,128,256,512,1024,2048,4096,8192,16384,32768,131072
UVM aobj 2 2K 2K 3687K 6305 0 0 16,32,64,128,256,1024
temp 9 10K 20K 3687K 428702 0 0 16,32,64,128,256,512,1024,2048,4096,8192
DMA map 214 70K 70K 3687K 214 0 0 64,256,512
USB 132 12K 12K 3687K 147 0 0 16,32,64,128,256,512
USB device 37 12K 12K 3687K 49 0 0 16,32,64,128,256,512
Pool 4 1K 1K 3687K 4 0 0 256
USB HC 15 1K 1K 3687K 15 0 0 16,32,64
NTFS 2 5K 5K 3687K 2 0 0 512,4096
pagedep 1 1K 1K 3687K 1 0 0 1024
inodedep 1 4K 4K 3687K 1 0 0 4096
newblk 1 1K 1K 3687K 1 0 0 256
Memory Totals: In Use Free Requests
2756K 305K 9072015
Memory resource pool statistics
Name Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg Idle
phpool 40 146 0 84 1 0 1 1 0 inf 0
pmappl 68 112446 0 112398 2 1 1 2 0 inf 0
vmsppl 180 112446 0 112398 4 1 3 4 0 inf 0
vmmpepl 60 1778871 0 1777893 18 1 17 18 0 inf 0
uaoeltpl 80 17 0 3 1 0 1 1 0 inf 0
aobjpl 52 6304 0 6303 1 0 1 1 0 inf 0
amappl 40 826862 0 826325 7 1 6 7 0 inf 0
mbpl 128 5960898 0 5960822 26 21 5 9 1 inf 1
mclpl 2048 1090936 0 1090867 111 68 43 57 4 128 7
sockpl 164 79816 0 79736 5 1 4 5 0 inf 0
ttypl 228 39 0 0 3 0 3 3 0 inf 0
rndsample 528 2935 0 2930 1 0 1 1 0 inf 0
procpl 320 112453 0 112400 8 3 5 7 0 inf 0
pgrppl 24 258 0 218 1 0 1 1 0 inf 0
pcredpl 24 112453 0 112400 1 0 1 1 0 inf 0
plimitpl 156 91 0 84 1 0 1 1 0 inf 0
rusgepl 72 112400 0 112400 12 11 1 1 0 inf 1
filepl 48 465932 0 465793 2 0 2 2 0 inf 0
cwdipl 12 112448 0 112400 1 0 1 1 0 inf 0
vnodepl 204 182657 0 0 9614 0 9614 9614 0 inf 0
ncachepl 72 778 0 0 14 0 14 14 0 inf 0
ffsinopl 212 969435 0 789589 9492 18 9474 9492 0 inf 0
ext2fsinopl 212 0 0 0 0 0 0 0 0 inf 0
lfsinopl 212 0 0 0 0 0 0 0 0 inf 0
nfsnodepl 188 124795 0 122015 141 1 140 140 0 inf 0
nfsvapl 100 124795 0 122015 75 1 74 74 0 inf 0
cd9660nopl 108 0 0 0 0 0 0 0 0 inf 0
msdosnopl 100 18203 0 18203 44 44 0 28 0 inf 0
wdcspl 48 187656 0 187656 1 0 1 1 0 inf 1
extent 20 6186 0 5838 3 0 3 3 0 inf 0
scxspl 120 0 0 0 0 0 0 0 0 inf 0
rtentpl 124 4 0 0 1 0 1 1 0 inf 0
ipqepl 40 320787 0 320787 4 4 0 1 0 inf 0
inpcbpl 96 560 0 523 2 0 2 2 0 inf 0
tcpcbpl 176 299 0 281 2 0 2 2 0 inf 0
synpl 156 22 0 22 1 1 0 1 0 inf 0
swp buf 148 5231 0 5231 1 0 1 1 0 inf 1
swp vnx 20 0 0 0 0 0 0 0 0 inf 0
swp vnd 124 0 0 0 0 0 0 0 0 inf 0
sigapl 840 112448 0 112400 26 13 13 18 0 inf 1
In use 74804K, total allocated 77748K; utilization -11.7%
--------------3F6900A7D6A27BA18719A89F--