Interrupt performance

Slawa Olhovchenkov slw at zxy.spb.ru
Sat Jan 29 14:17:42 UTC 2011


On Sat, Jan 29, 2011 at 11:54:11PM +1100, Bruce Evans wrote:

> >> So FreeBSD has about 18% more network overhead (absolute: 65-47), or
> >> about 38% more network overhead (relative: (65-47)/47).  Not too
> >> surprising -- the context switches alone might cost that.
> >
> > For only 14K vs 56K interrupt. 152% more network overhead per one interrupt.
> 
> No, FreeBSD does 4 times as much work per interrupt.  4 times as much
> (300%) "overhead" per interrupt is to be expected, since most (hopefully
> more than half :-) of the "overhead" is actual work.
> 
> > And I see drammaticaly less number of context switches in linux stats
> > (by dstat).
> 
> FreeBSD uses ithreds for most interrupts, so of course it does many
> more context switches (at least 2 per interrupt).  This doesn't make
> much difference provided there are not too many.  I think the version
> of re that you are using actually uses "fast" interrupts and a task
> queue.  This also seems to be making little difference.  You get a
> relatively lightweight "fast" interrupt following by followed by a
> context switch to and from the task.  IIRC, your statistics showed 
> about twice as many context switches as interrupts, so the task queue
> isn't doing much to reduce the "interrupt overhead" -- it just gives
> context switches to the task instead of to an ithread.

It seems as root of difference with linux systems.

I found this link
http://www.freebsd.org/doc/en/books/arch-handbook/smp-design.html.
No light weight context switches in the near future?


More information about the freebsd-performance mailing list