cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Curl/LibCurl compiled on OS X without --disable-ipv6 is really slow

From: Shantonu Sen <ssen_at_apple.com>
Date: Sat, 27 Dec 2003 00:44:42 -0800

On Dec 24, 2003, at 4:56 PM, Jacob Swed wrote:

> The name lookup time is reported by curl using -w with time_namelookup.

Great! I think I see what's going on here...

> As mentioned before you can see this delta regardless of the hostname
> used. Here are three more random examples, all well known, all http.
>
> With IPv6 disabled:
> "http://www.apple.com" name lookup took: 0.003 seconds
> "http://www.yahoo.com" name lookup took: 0.912 seconds
> "http://www.nintendo.com" name lookup took: 0.100 seconds
>
> With IPv6 enabled:
> "http://www.apple.com" name lookup took: 4.590 seconds
> "http://www.yahoo.com" name lookup took: 4.821 seconds
> "http://www.nintendo.com" name lookup took: 3.393 seconds

Try "http://www.kame.net". In steady state, I would expect the lookup
to be very fast.

The issue here is that Mac OS X's lookupd resolution and caching daemon
does not, by default, do negative caching. When you do a getaddrinfo()
with PF_UNSPEC, lookupd is asked for both v4 IP address (A records) and
v6 IP addresses (AAAA records). For the vast majority of hosts on the
internet, no AAAA records are present, although A records are. Somehow,
this is preventing any positive caching from happening as well, since I
see a lot of A queries being sent over the network.

I'll poke at this a bit more to try to figure out why this is so
pessimistic...

Shantonu

-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills. Sign up for IBM's
Free Linux Tutorials. Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
Received on 2003-12-27