mbuf usage for an idle machine

Mike Silbersack silby at silby.com
Wed Aug 27 09:41:24 PDT 2003


On Wed, 27 Aug 2003, Giovanni P. Tirloni wrote:

> Hi,
>
>  I've been reading about mbufs and how they're used for
>  holding network packets and socket buffers and the
>  output of 'netstat -m' for a idle machine I've here
>  made me curious about how FreeBSD handles it in -CURRENT.
>
>  Why is it using so many mbufs when it's idle? My
>  small kwnowledge doesn't permit me to answer this
>  question yet ;)

The mbufs in question are (mostly) being used as receive buffers by the
network drivers.  With modern DMA based cards, you pre-allocate the
buffers, then hand them over to the card's control.  Once they're filled
with packet data, the NIC informs the OS, which replaces them with new
buffers.

A lot of our drivers have 128 (or some power of 2) receive buffers, hence
your mbuf usage.

Mike "Silby" Silbersack


More information about the freebsd-net mailing list