Buy commercial curl support. We
help you work out your issues, debug your libcurl applications, use the API,
port to new platforms, add new features and more. With a team lead by the
curl founder Daniel himself.
measuring appconnect time accurately, Ubuntu 24.04 (RISC-V)
- Contemporary messages sorted: [ by date ] [ by thread ] [ by subject ] [ by author ] [ by messages with attachments ]
From: Faried Nawaz via curl-users <curl-users_at_lists.haxx.se>
Date: Wed, 14 Aug 2024 20:41:56 +0500
Hello,
I use curl with smokeping on an SBC (VisionFive 2) to measure latency to a
few websites. My config is
[...]
# binary = /usr/bin/curl
binary = /usr/local/curl-8.9/bin/curl
agent = User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7)
AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.
36 ZX/1.0
extraargs = --tlsv1.3 -4 -o /dev/null
write_out = time_appconnect
I noticed a month ago that my times had jumped by 200ms all on their own,
with no change to the ICMP pings. Using --trace-time, I found out that all
the extra time went into reading the certificates from /etc/ssl. At the
time I was running debian sid, and this change (or one after it) seemed
like the cause:
https://metadata.ftp-master.debian.org/changelogs//main/c/curl/curl_8.9.1-2_changelog
curl (8.8.0-2) unstable; urgency=medium
* curl.NEWS: Announce switch to GnuTLS, HTTP3 support and wcurl
* Switch curl package/binary to use gnutls, now with HTTP3 support
* Build libcurl-gnutls with HTTP3 support (build-dep on nghttp3 and
ngtcp2)
* Build libcurl-gnutls with ca-bundle=/etc/ssl/certs/ca-certificates.crt
* Build with websockets support
* Ship fish completion file
* Ship wcurl and its manpage
-- Samuel Henrique <samueloph_at_debian.org> Sun, 30 Jun 2024 13:53:05 +0100
I built curl 8.9.0 with openssl, and everything was better... until I had
to switch to Ubuntu 24.04. Now, even with 8.9.1 built against openssl
3.0.13-0ubuntu3.2, something is slower than what I had before:
https://imgur.com/a/lpEoiag
One of the hosts I test against (I run it) is about 55-60ms away, and I get
similar figures if I hit it with http:// instead of https://. For
comparison, here are three runs each of curl 7.81.0-1ubuntu1.17 on my
Ubuntu 22.04 desktop vs 8.9.1 on the SBC (both use gigabit ethernet):
curl 7.81.0 (x86_64-pc-linux-gnu) libcurl/7.81.0 OpenSSL/3.0.2 zlib/1.2.11
brotli/1.0.9 zstd/1.4.8 libidn2/2.3.2 libpsl/0.21.0 (+libidn2/2.3.2)
libssh/0.9.6/openssl/zlib nghttp2/1.43.0 librtmp/2.3 OpenLDAP/2.5.18
dnslookup: 0.001327 | connect: 0.054037 | appconnect: 0.184160 |
pretransfer: 0.184255 | starttransfer: 0.237856 | total: 0.237977 | size:
4457 | scheme: HTTPS | status: 200
dnslookup: 0.001436 | connect: 0.056916 | appconnect: 0.199100 |
pretransfer: 0.199212 | starttransfer: 0.256657 | total: 0.256701 | size:
4457 | scheme: HTTPS | status: 200
dnslookup: 0.001538 | connect: 0.054952 | appconnect: 0.187826 |
pretransfer: 0.187933 | starttransfer: 0.242184 | total: 0.242319 | size:
4457 | scheme: HTTPS | status: 200
curl 8.9.1 (riscv64-unknown-linux-gnu) libcurl/8.9.1 OpenSSL/3.0.13
zlib/1.3 brotli/1.1.0 zstd/1.5.5 libidn2/2.3.7 libpsl/0.21.2 nghttp2/1.59.0
librtmp/2.3 OpenLDAP/2.6.7
dnslookup: 0.001702 | connect: 0.057563 | appconnect: 0.232920 |
pretransfer: 0.233356 | starttransfer: 0.296223 | total: 0.296407 | size:
4457 | scheme: https | status: 200
dnslookup: 0.001686 | connect: 0.055233 | appconnect: 0.233986 |
pretransfer: 0.234508 | starttransfer: 0.288859 | total: 0.289049 | size:
4457 | scheme: https | status: 200
dnslookup: 0.001688 | connect: 0.055571 | appconnect: 0.230758 |
pretransfer: 0.231178 | starttransfer: 0.291485 | total: 0.291682 | size:
4457 | scheme: https | status: 200
I know that I'm at a disadvantage here with a platform that likely has less
optimization in its crypto libraries than x86 or Arm, but do I have any
options here?
Faried.
Date: Wed, 14 Aug 2024 20:41:56 +0500
Hello,
I use curl with smokeping on an SBC (VisionFive 2) to measure latency to a
few websites. My config is
[...]
# binary = /usr/bin/curl
binary = /usr/local/curl-8.9/bin/curl
agent = User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7)
AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.
36 ZX/1.0
extraargs = --tlsv1.3 -4 -o /dev/null
write_out = time_appconnect
I noticed a month ago that my times had jumped by 200ms all on their own,
with no change to the ICMP pings. Using --trace-time, I found out that all
the extra time went into reading the certificates from /etc/ssl. At the
time I was running debian sid, and this change (or one after it) seemed
like the cause:
https://metadata.ftp-master.debian.org/changelogs//main/c/curl/curl_8.9.1-2_changelog
curl (8.8.0-2) unstable; urgency=medium
* curl.NEWS: Announce switch to GnuTLS, HTTP3 support and wcurl
* Switch curl package/binary to use gnutls, now with HTTP3 support
* Build libcurl-gnutls with HTTP3 support (build-dep on nghttp3 and
ngtcp2)
* Build libcurl-gnutls with ca-bundle=/etc/ssl/certs/ca-certificates.crt
* Build with websockets support
* Ship fish completion file
* Ship wcurl and its manpage
-- Samuel Henrique <samueloph_at_debian.org> Sun, 30 Jun 2024 13:53:05 +0100
I built curl 8.9.0 with openssl, and everything was better... until I had
to switch to Ubuntu 24.04. Now, even with 8.9.1 built against openssl
3.0.13-0ubuntu3.2, something is slower than what I had before:
https://imgur.com/a/lpEoiag
One of the hosts I test against (I run it) is about 55-60ms away, and I get
similar figures if I hit it with http:// instead of https://. For
comparison, here are three runs each of curl 7.81.0-1ubuntu1.17 on my
Ubuntu 22.04 desktop vs 8.9.1 on the SBC (both use gigabit ethernet):
curl 7.81.0 (x86_64-pc-linux-gnu) libcurl/7.81.0 OpenSSL/3.0.2 zlib/1.2.11
brotli/1.0.9 zstd/1.4.8 libidn2/2.3.2 libpsl/0.21.0 (+libidn2/2.3.2)
libssh/0.9.6/openssl/zlib nghttp2/1.43.0 librtmp/2.3 OpenLDAP/2.5.18
dnslookup: 0.001327 | connect: 0.054037 | appconnect: 0.184160 |
pretransfer: 0.184255 | starttransfer: 0.237856 | total: 0.237977 | size:
4457 | scheme: HTTPS | status: 200
dnslookup: 0.001436 | connect: 0.056916 | appconnect: 0.199100 |
pretransfer: 0.199212 | starttransfer: 0.256657 | total: 0.256701 | size:
4457 | scheme: HTTPS | status: 200
dnslookup: 0.001538 | connect: 0.054952 | appconnect: 0.187826 |
pretransfer: 0.187933 | starttransfer: 0.242184 | total: 0.242319 | size:
4457 | scheme: HTTPS | status: 200
curl 8.9.1 (riscv64-unknown-linux-gnu) libcurl/8.9.1 OpenSSL/3.0.13
zlib/1.3 brotli/1.1.0 zstd/1.5.5 libidn2/2.3.7 libpsl/0.21.2 nghttp2/1.59.0
librtmp/2.3 OpenLDAP/2.6.7
dnslookup: 0.001702 | connect: 0.057563 | appconnect: 0.232920 |
pretransfer: 0.233356 | starttransfer: 0.296223 | total: 0.296407 | size:
4457 | scheme: https | status: 200
dnslookup: 0.001686 | connect: 0.055233 | appconnect: 0.233986 |
pretransfer: 0.234508 | starttransfer: 0.288859 | total: 0.289049 | size:
4457 | scheme: https | status: 200
dnslookup: 0.001688 | connect: 0.055571 | appconnect: 0.230758 |
pretransfer: 0.231178 | starttransfer: 0.291485 | total: 0.291682 | size:
4457 | scheme: https | status: 200
I know that I'm at a disadvantage here with a platform that likely has less
optimization in its crypto libraries than x86 or Arm, but do I have any
options here?
Faried.
-- Unsubscribe: https://lists.haxx.se/mailman/listinfo/curl-users Etiquette: https://curl.se/mail/etiquette.htmlReceived on 2024-08-14