bge interrupt coalescing sysctls

Bruce Evans brde at optusnet.com.au
Thu Jun 11 01:54:38 UTC 2009


On Wed, 10 Jun 2009, Igor Sysoev wrote:

> For a long time I used Bruce Evans' patch to tune bge interrupt coalescing:
> http://lists.freebsd.org/pipermail/freebsd-net/2007-November/015956.html
> However, recent commit SVN r192478 in 7-STABLE (r192127 in HEAD) had broken
> the patch. I'm not sure how to fix the collision, and since I do not
> use dynamic tuning

That commit looked ugly (lots of internal API changes and bloat in interrupt
handlers in many network drivers to support polling which mostly shouldn't
be supported at all and mostly doesn't use the interrupt handlers).

> I has left only static coalescing parameters in the patch
> and has added a loader tunable to set number of receive descriptors and
> read only sysctl to read the tunable. I usually use these parameters:
>
> /boot/loader.conf:
> hw.bge.rxd=512
>
> /etc/sysctl.conf:
> dev.bge.0.rx_coal_ticks=500
> dev.bge.0.tx_coal_ticks=10000
> dev.bge.0.rx_max_coal_bds=64

These rx settings give to high a latency for me.

> dev.bge.0.tx_max_coal_bds=128
> # apply the above parameters
> dev.bge.0.program_coal=1
>
> Could anyone commit it ?

Not me, sorry.

The patch is quite clean.  If I committed then I would commit the
dynamic coalescing configuration separately anyway.

You can probably make hw.bge.rxd a sysctl too (it would take a down/up
to get it changed, but that is already needed for too many parameters
in network drivers anyway).  I should use a sysctl for the ifq length
too.  This could be done at a high level for each driver.  Limiting
queue lengths may be a good way to reduce cache misses, while increasing
them is sometimes good for reducing packet loss.

Bruce


More information about the freebsd-net mailing list