Interesting... we're having a similar discussion under the title "File
I/O within kernel thread"

On Sun, 2005-07-31 at 11:35 -0400, Rami Rosen wrote:
> Hi, 
> NAPI (New API) is a technique to improve network performance on Linux.
> It is not so "new"  (relatively) - first howto is from 16/2/2002.
> 
> In a really very brief descriptiom  , it uses polling intsead of
> interrupts in some scenarios.
> This polling is done for receiving packets (the network card must  be
> able to disbale interrupts).
> Transmitting packets is done as usual, by asserting interrupts. 
> Polling is usually discouraged in linux device drivers , but there are
> cases (like when the interrupt rate is very high) in which this
> technique can improve
> performance.
> 
> My question is: 
> 1) does anybody have an experience with this technique ? 
>     what is the threshold (of k packets for a second) from which it
> became efficinet
> to use NAPI over usual non-NAPI solutions ? 
>     (I am talking about Xeon processor ~2.4 Ghz , but also data on
> other prcoessors can help)
> 

Worlds apart.
Non NAPI drivers simply interrupt storm themselves to death under near
GbE  loads.
I'm guessing here, but at around 70,000 interrupts per second (FE load,
~100Mbps) you'll be spending most of your CPU time inside the driver's
interrupt handler.
While NAPI added additional load and latency under close to idle-loads,
once you cross the FE border line, the added cycles and latency simply
becomes irrelevant.

> 2) Specically regarding NAPI and Broadcom cards: 
>      On many distrubutins, the Broadcom BCM5700  family of Network
Drivers
>      uses the tg3 driver. ( Tigon3 ethernet driver,
in /linux/drivers/net/tg3.c)

Tg3 has NAPI support since 2.4.2x (Though I'm not sure about the "when"
business).
In general, while the Intel e1000 seem to behave better under very high
utilization (better hardware?) both should handle full Gb RX when NAPI
is enabled at an acceptable CPU utilization. (Read: You'll have enough
CPU time to do something useful with the incoming packets)

> 
>      On broadcom website there is a driver for linux that they wrote
for Linux.
> http://www.broadcom.com/drivers/downloaddrivers.php
> (the BCM57xx Drivers). 
> 
> Is there any advantage of using the Broadcom drivers to using the tg3
driver ? 
> (and does the kernel version - 2.4 or 2.6 - has any importance in this
respect?)
> 

I found the tg3 to work just fine.
Never tested the broadcom driver, though. So YMMV.

Gilboa


=================================================================
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]

Reply via email to