cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Speed comparison wget vs. curl (HTTPS/HTTP1/GnuTLS)

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Thu, 30 Jun 2016 10:34:59 +0200 (CEST)

On Wed, 29 Jun 2016, Tim Rühsen wrote:

> So my question goes... what is 'wrong' with that version of curl. Or what
> did I oversee - maybe some special options ?

Data point: I tried several different resolver and TLS build options and they
mostly show a difference no matter what. It seems to be generic.

I ran both command lines with 'strace -tt' and that turns out highly
interesting. It shows one particular gap in time that I can't see a motivation
for. I typically looks something like this:

10:28:58.687457 sendto(4, "\26\3\3\0
\351\25\234H\324\222cY\301\254XC\375h(C\350\213\331\322J\311:Q\235g\f"..., 37,
MSG_NOSIGNAL, NULL, 0) = 37
10:28:58.687479 recvfrom(4, 0xd8585b, 5, 0, 0, 0) = -1 EAGAIN (Resource
temporarily unavailable)
10:28:58.687496 poll([{fd=4, events=POLLIN|POLLPRI|POLLRDNORM|POLLRDBAND}], 1,
0) = 0 (Timeout)
10:28:58.687513 poll([{fd=4, events=POLLIN}], 1, 181) = 1 ([{fd=4,
revents=POLLIN}])

*** See a huge gap in time here. 45 millseconds doing nothing, for a 1500
bytes response body over a <3ms RTT connection...!

10:28:58.732615 poll([{fd=4, events=POLLIN|POLLPRI|POLLRDNORM|POLLRDBAND}], 1,
0) = 1 ([{fd=4, revents=POLLIN|POLLRDNORM}])
10:28:58.732794 recvfrom(4, "\26\3\3\0\316", 5, 0, NULL, NULL) = 5
10:28:58.732960 recvfrom(4,
"\4\0\0\312\0\1\211\300\0\304\2w\0\2341\357\364d\303\334\273\371=\3\\\251\333\321\225\217?N"...,
206, 0, NULL, NULL) = 206

Worth checking out in more detail I think!

-- 
  / daniel.haxx.se

-------------------------------------------------------------------
List admin: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2016-06-30