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.


_______________________________________________
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to