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: Wed, 24 Dec 2003 15:45:42 -0800

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
Received on 2003-12-25