cURL / Mailing Lists / curl-library / Single Mail

curl-library

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

From: Jacob Swed <gryla_at_earthlink.net>
Date: Wed, 24 Dec 2003 16:56:34 -0800

The name lookup time is reported by curl using -w with time_namelookup.
-v is not really relevant here. Once the name is resolved the
connection/download phase occurs in roughly the same time in either
case.

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

BTW: It should be noted that when doing authentication like NTLM those
lookup times are compounded.

On Wednesday, December 24, 2003, at 03:45 PM, Shantonu Sen wrote:

>
> On Dec 24, 2003, at 2:47 AM, Jacob Swed wrote:
>
>>> "without --disable-ipv6" mean?
>> It means when running the Configure script we did not specify the
>> --disable-ipv6 option.
>>
>> Unfortunately, our test servers are internal and our customers are
>> accessing Microsoft Exchange with our products so that isn't an
>> option either. However, any hostname will do, but a good example is
>> actually to pass a non-existent IP address.
>
> Actually, no, that's a terrible example. When you try to connect to a
> non-existent (well really, an IP address for which no machine is
> accepting network connections), curl goes into a select looping
> waiting for either a connection, an internal timeout, or potentially
> an OS timeout. One of the timeouts is being hit, which is why it is
> taking a long time.
>
>> Here are a couple example, in both cases latest Curl run from the cmd
>> line. It was compiled and run on OS 10.2.8. Also, 192.168.1.234 does
>> not exist on our network.
>>
>> With IPv6 Enabled:
>> "https://www.frontrange.edu/index.cfm" name lookup took: 1.964 seconds
>> "http://192.168.1.234" name lookup took: 22.632 seconds
>>
>> With IPv6 Disabled:
>> "https://www.frontrange.edu/index.cfm" name lookup took: 0.003 seconds
>> "http://192.168.1.234" name lookup took: 0.001 seconds
>
> HTTPS connections are bad examples, since overhead from SSL
> negotiation (several network round trips and some computation) can
> obscure test data. Do you have a non-HTTPS site, and a
> non-non-existent host that you can give as an example? I tried "curl
> -v -I http://www.frontrange.edu/" with both --disable-ipv6 and not
> versions of curl, and the timings were similar (less than a second
> over a slow DSL modem)
>
> Also, how are you determining that the name lookup is taking that much
> time? For an IP address like "192.168.1.234" I would expect almost no
> time taken with the lookup, and a lot of time waiting for the
> connection to fail. What is the curl -v output?
>
> 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
>

-------------------------------------------------------
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-25