Date: Wed, 16 Feb 2005 02:22:50 -0800 (PST) From: Don Lewis <truckman@FreeBSD.org> To: max@love2party.net Cc: borjamar@sarenet.es Subject: Re: MBUF statistics Message-ID: <200502161022.j1GAMoDS026200@gw.catspoiler.org> In-Reply-To: <200502151655.09800.max@love2party.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On 15 Feb, Max Laier wrote: > On Tuesday 15 February 2005 12:38, Borja Marcos wrote: >> Hello, >> >> Looking at the mbuf statistics available in FreeBSD 4 and FreeBSD 5 I >> can see that the statistics available in FreeBSD 5 are, surprisingly, >> much less comprehensive. Is there any other place where I can find out >> how many mbuf requests have been done, how many of them have waited, >> how many have failed, etc? > > I use "$vmstat -z | grep Mbuf". The netstat -m output is broken, because > fixing this would impose an additional atomic operation on each alloc/free > which is a real performance killer. Why not maintain the statistics on a per-CPU basis, and sum up the per-CPU statistics in the sysctl handler? The handler might not get an exact snapshot, but that shouldn't matter. In the case of counters that are wider than 32 bits, it might be necessary to break the counters up into chunks that can be incremented atomically, and grab a lock when the least significant chunk overflows.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200502161022.j1GAMoDS026200>