Subject: Re: questions on NAPI processing latency and dropped network packets

From: Ben Greear <[email-masked]>
Date: Mon, 21 Jan 2008 15:32:39 -0800

Chris Friesen wrote:
> Ben Greear wrote:
>> Chris Friesen wrote:
>>
>>> Is there anything else we can do to minimize the latency of network 
>>> packet processing and avoid having to crank the rx ring size up so high?
>>
>>
>> Why is it such a big deal to crank up the rx queue length?  Seems like
>> a perfectly normal way to handle bursts like this...
> 
> It means that the latency for handling those packets is higher than it 
> could be.  Draining 4096 packets from the queue will take a while.
> 
> Ideally we'd like to bring the latency down as much as possible, and 
> then bump up the rx queue length to handle the rest.

Unless having a bigger queue somehow makes the IRQ fire later,
then it wouldn't seem to increase the time for packets that arrive
early in the queue, though it would of course take longer to process
the ones at the back.  Still, if the option is process them slightly
later or drop them, the choice seems obvious...

Decreasing your latencies seems a mostly un-related optimization that
should be tackled independently of queue size.

Do you perhaps have any network equipment that would queue up the pkts
and burst them?  Maybe a firewall, router, or something?  That could
potentially cause small bursts of pkts...

Ben

-- 
Ben Greear <[email-masked]>
Candela Technologies Inc  http://www.candelatech.com