Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 27 Aug 2003 11:40:17 -0500 (CDT)
From:      Mike Silbersack <silby@silby.com>
To:        "Giovanni P. Tirloni" <gpt@tirloni.org>
Cc:        freebsd-net@freebsd.org
Subject:   Re: mbuf usage for an idle machine
Message-ID:  <20030827113639.A4269@odysseus.silby.com>
In-Reply-To: <20030827030314.GJ40033@pixies.tirloni.org>
References:  <20030827030314.GJ40033@pixies.tirloni.org>

next in thread | previous in thread | raw e-mail | index | archive | help

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030827113639.A4269>