Interrupt performance

Slawa Olhovchenkov slw at
Tue Feb 1 12:18:05 UTC 2011

On Tue, Feb 01, 2011 at 02:07:51PM +0200, Stefan Lambrev wrote:

> > I do some more test and build kernel with KTR.
> > Now I don't think that inetrrupt overhead on FreeBSD weight: I try
> > polling and don't see any difference.
> > 
> > I see many reported by netperf send errors. I found this
> >
> > 
> > After insert into src/nettest_bsd.c usleep(1000) if ENOBUF I see 53%
> > idle and ./loop 2000000000 "Elapsed 15188006 us" -- this near to linux
> > (Elapsed 14107670 us).
> > 
> > 10% of difference may be by more weight network stack (only 32104
> > ticks from 126136 in interrupt handler and task switching, and 94032
> > -- UDP processing in network stack and passing datagram to driver).
> > May be weight SOCKBUF_LOCK/SOCKBUF_UNLOCK and/or
> Try to run with the same network buffers on FreeBSD and Linux.
> I think, the default values in freebsd are much, much lower.

Set large buffers on FreeBSD -- the first that I try.
Also, netperf use setsockopt() and netperf run on linux with same
options (include -s 128K -S 128K). 

> Also in the past ENOBUF was not handled properly in linux.
> - Do not rely on Linux-specific socket behaviour. In particular, default socket buffer sizes are different (call setsockopt() with SO_SNDBUF and SO_RCVBUF), and while Linux's send() blocks when the socket buffer is full, FreeBSD's will fail and set ENOBUFS in errno.

Yes, about ENOBUFS with udp socket I told.
And this behaviour (block on udp socket send) in Solaris too.
I don't know what behaviour is right.

More information about the freebsd-performance mailing list