Re: nonblocking UDPv4 recvfrom() taking 4usec @ 3GHz?
From: bert hubert <hidden>
Date: 2007-02-20 08:05:00
On Mon, Feb 19, 2007 at 03:56:23PM -0800, Stephen Hemminger wrote:
quoted
Linux 2.6.20-rc4 appears to take 4 microseconds on my P4 3GHz for a non-blocking UDPv4 recvfrom() call, both on loopback and ethernet. Linux 2.6.18 on my 64 bit Athlon64 3200+ takes a similar amount of time.
quoted
recvfrom itself is a tad worrisome, x=recvfrom. I didn't ask for the 'libc_enable_asynccancel' stuff. I'm trying to isolate the actual syscall but it is proving hard work for an assemnly newbie like me - socketcall doesn't make things easier.
Together with Zwane Mwaikambo, we managed to isolate the pure syscall, it doesn't make a difference, a single recvfrom continues to take around 4 microseconds at 3GHz. Many thanks to Zwane for helping out.
Use oprofile to find the hotspot.
Will do this next - I need to get me a setup where I can do oprofile *and* decent query rates, I don't do oprofile on my remote machines I don't have easy access to. Thanks. -- http://www.PowerDNS.com Open source, database driven DNS Software http://netherlabs.nl Open and Closed source services