Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 17 Nov 2007 08:30:58 +1100 (EST)
From:      Bruce Evans <brde@optusnet.com.au>
To:        Igor Sysoev <is@rambler-co.ru>
Cc:        freebsd-net@FreeBSD.org
Subject:   Re: bge loader tunables
Message-ID:  <20071117065908.T65479@delplex.bde.org>
In-Reply-To: <20071116154019.GE93422@rambler-co.ru>
References:  <20071116154019.GE93422@rambler-co.ru>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 16 Nov 2007, Igor Sysoev wrote:

> The attached patch creates the following bge loader tunables:

I plan to commit old work to do this using sysctls.  Tunables are
harder to use and aren't needed since changes to the defaults aren't
needed for booting.  I also implemented dynamic tuning for rx coal
parameters so that the sysctls are mostly not needed.  Ask for patches
if you want to test this extensively.

> hw.bge.rxd=512
>
> Number of standard receive descriptors allocated by the driver.
> The default value is 256. The maximum value is 512.

I always use 512 for this.  The corresponding value for jumbo buffers
is hard-coded (JSLOTS exists to tune the value at config time, like
SSLOTS does for this, but is no longer used).  Only machines with a
small amount of memory should care about the wastage from always
allocating the max number of descriptors.

> hw.bge.rx_int_delay=500
>
> This value delays the generation of receive interrupts in microseconds.
> The default value is 150 microseconds.

This is a good default.  I normally use 100 (goes with dynamic tuning to
limit the rx interrupt rate to 10 kHz).

> hw.bge.tx_int_delay=500
>
> This value delays the generation of transmit interrupts in microseconds.
> The default value is 150 microseconds.

I use 1 second.  Infinity works right, except it wastes mbufs when the
tx is idle for a long time.

> hw.bge.rx_coal_desc=64
>
> This value delays the generation of receive interrupts until specified
> number of packets will be received. The default value is 10.

64 is a good default.  10 is a bad default (it optimizes too much for
latency at a cost of efficiency to be good). I use 1 when optimizing
for latency.  Dynamic tuning sets this to a value suitable for limiting
the rx interrupt rate to a specified frequency (10 kHz is a good limit).

> hw.bge.tx_coal_desc=128
>
> This value delays the generation of transmit interrupts until specified
> number of packets will be transmited. The default value is 10.

128 is a good default.  I use 384.  There are few latency issues here, so
the default of 10 mainly costs efficiency.

Bruce



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