Network interrupt and NAPI in FreeBSD?

Wei Hu weh at microsoft.com
Mon Mar 9 04:07:45 UTC 2015


> -----Original Message-----
> From: adrian.chadd at gmail.com [mailto:adrian.chadd at gmail.com] On Behalf
> Of Adrian Chadd
> Sent: Saturday, March 7, 2015 4:27 PM
> To: Wei Hu
> Cc: Luigi Rizzo; freebsd-net at freebsd.org
> Subject: Re: Network interrupt and NAPI in FreeBSD?
> 
> Hi,
> 
> Well, hm. What's generating the interrupts? How many interrupts/second
> are you talking about here?
> 
> People have asked about a NAPI style solution for FreeBSD for a while, but
> for most folk that are using one physical interface that does interrupt
> moderation/rate-limiting, it turns out to not be all that big a benefit. For
> boxes that haves multiple interfaces, or for VMs whose software interrupt
> path doesn't implement any kind of thresholds for interrupt moderation, it
> still can be a benefit.
> 
> So maybe try looking at making your driver support POLLING and see what
> happens.
> 
> Maybe virtualisation will be the straw that breaks the NAPI back for
> FreeBSD. ;)
> 

I haven't got chance to measure the interrupt/second rate. What I have seen is when running
the same iperf test, the vCPU handle the network queue is over 80% busy running in interrupt
context on FreeBSD, comparing to around 15% busy in interrupt context on Linux. The throughput
is around 2.0 Gbps vs 3.0 Gbps.

I am using a slightly new netvsc driver with TSO support. It hasn't not been officially out yet. 

Wei



More information about the freebsd-net mailing list