curl / Mailing Lists / curl-library / Single Mail

curl-library

Curl 7.47.0 with GnuTLS 3.4.10 has bad appconnect times

From: Bernhard Jaeger <B.Jaeger1_at_gmx.net>
Date: Wed, 1 Aug 2018 17:09:32 +0200
I was working with different VM's testing the connection establishment times. One thing we noticed was that curl needed much longer to connect on some of the vm's than on others (3x as much or + 100ms). Upon checking the versions of the libraries we noticed that those ones performing bad were build against GnuTLS (3.4.10) while those ones performing good where build against OpenSSL.
Now this solved the problem for me but did want to report it somewhere in case someone has the same problem.
Not sure if this is a problem with curl in combination with GnuTLS or if OpenSSL just outperforms GnuTLS or something different.
 
For reference here are the different versions we tested and their connect times:
 
curl -V
curl 7.47.0 (x86_64-pc-linux-gnu) libcurl/7.47.0 GnuTLS/3.4.10 zlib/1.2.8 libidn/1.32 librtmp/2.3
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtmp rtsp smb smbs smtp smtps telnet tftp
Features: AsynchDNS IDN IPv6 Largefile GSS-API Kerberos SPNEGO NTLM NTLM_WB SSL libz TLS-SRP UnixSockets
 
curl -o /dev/null -s -w '%{time_appconnect}\n' https://www.youtube.com
0.150
 
 
 
curl -V
curl 7.61.0 (x86_64-pc-linux-gnu) libcurl/7.61.0 OpenSSL/1.1.1 zlib/1.2.8
Release-Date: 2018-07-11
Protocols: dict file ftp ftps gopher http https imap imaps pop3 pop3s rtsp smb smbs smtp smtps telnet tftp
Features: IPv6 Largefile NTLM NTLM_WB SSL libz TLS-SRP UnixSockets HTTPS-proxy
Now the interesting part is that I get the good connections times with the new curl:
 
curl -o /dev/null -s -w '%{time_appconnect}\n' https://www.youtube.com
0.045412
 
 
 
curl -V
curl 7.35.0 (x86_64-pc-linux-gnu) libcurl/7.35.0 OpenSSL/1.0.1f
zlib/1.2.8 libidn/1.28 librtmp/2.3
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps
pop3 pop3s rtmp rtsp smtp smtps telnet tftp
Features: AsynchDNS GSS-Negotiate IDN IPv6 Largefile NTLM NTLM_WB SSL
libz TLS-SRP
 
curl -o /dev/null -s -w '%{time_appconnect}\n' https://www.youtube.com
Results where < 0.050
 
-- Bernhard Jaeger

-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2018-08-01