Subject: Re: _High_ CPU usage while routing (mostly) small UDP packets

From: [email-masked]
Date: Tue, 07 Dec 2004 13:39:14 +0000

jamal wrote:
> On Tue, 2004-12-07 at 07:50, Karsten Desler wrote:
> 
> 
>>Currently I'm having problems capturing packets with tcpdump (lots of
>>"packets dropped by kernel") which indicates to me that there's
>>genuinely not much (enough) idle time sitting around.
>>
> 
> Ah, more hints. So you are not trying to forward - rather just packet
> capturing?
> Are you using a tcpdump patched with mmaped packet socket?
> 
> The 230-240Kpps you are reporting as a capture dont seem as unreasonable
> as i thought then. Neither would the CPU use.

Yes this is vital Karsten, otherwise tcpdump
will do 2 syscalls per packet, which is the
bottleneck in my experience.

You may want to try a simpler capture program that
uses the kernel PACKET_MMAP feature directly:
http://www.scaramanga.co.uk/code-fu/lincap.c

-- 
Pádraig Brady - http://www.pixelbeat.org
--