netisr_direct

Bruce Evans bde at zeta.org.au
Sat Mar 10 03:18:06 UTC 2007


On Thu, 8 Mar 2007, Dave Baukus wrote:

> What's the word on netisr_direct ?
> Do people typically enable this feature ?

I always enable it, but have never measured it doing anything useful.
Under light loads, it should reduce network latency and overheads by
a microsecond or two (whatever it takes to do 2 context switches
(hopefully the bug that made it take 4 context switches is fixed)),
but then the latency is still much larger than a microsecond or two
(50 uS is unusually good and 100's of uS are common) and the overhead
doesn't matter.  Under heavy loads, not using it is potentially better
since not using it allows queue lengths to grow longer so that the
queues get processed more efficiently in bursts.  However, I think
there is no explicit management of queue lengths or latencies now, so
machines that are too fast probably gain by doing direct dispatch if
possible, since with indirect dispatch they would do the context
switches to and from the netisr fast enough to keep queue lengths
usually <= 1.

Bruce


More information about the freebsd-net mailing list