Date: Sat, 27 Dec 2008 00:32:09 +0100 From: =?UTF-8?Q?Nikola_Kne=C5=BEevi=C4=87?= <laladelausanne@gmail.com> To: freebsd-hackers@freebsd.org Subject: debugging mbuf allocation/dealocation Message-ID: <623D1024-5DA0-4252-8DA9-FA86E0407DA8@gmail.com>
next in thread | raw e-mail | index | archive | help
Hi, I'm trying to make some code which uses a lot of mbufs (Click modular router) running under FreeBSD 7.1. The problem is that it is leaking mbufs, and I can't find where... After running the Click in a configuration which generates 150k packets (using m_dup) and discards them (m_freem), I get this in netstat -m output: 150258/1302/151560 mbufs in use (current/cache/total) 256/828/1084/4672 mbuf clusters in use (current/cache/total/max) 256/768 mbuf+clusters out of packet secondary zone in use (current/ cache) 0/135/135/2336 4k (page size) jumbo clusters in use (current/cache/ total/max) 0/0/0/1168 9k jumbo clusters in use (current/cache/total/max) 0/0/0/584 16k jumbo clusters in use (current/cache/total/max) 38076K/2521K/40598K bytes allocated to network (current/cache/total) 0/0/0 requests for mbufs denied (mbufs/clusters/mbuf+clusters) 0/0/0 requests for jumbo clusters denied (4k/9k/16k) 0/0/0 sfbufs in use (current/peak/max) 0 requests for sfbufs denied 0 requests for sfbufs delayed 0 requests for I/O initiated by sendfile 0 calls to protocol drain routines So, my question is: how to debug this? How can I track the usage of mbufs, profile it, and such? I'm running Click as a kernel module. Thanks, Nikola
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?623D1024-5DA0-4252-8DA9-FA86E0407DA8>