curl / Mailing Lists / curl-library / Single Mail

curl-library

Re: libssh2 optimization [was: Re: Windows users! Help us test upload performance tuning?]

From: Daniel Jeliński via curl-library <curl-library_at_cool.haxx.se>
Date: Sun, 26 Aug 2018 09:09:58 +0200

niedz., 26 sie 2018 o 03:36 Jan Ehrhardt via curl-library
<curl-library_at_cool.haxx.se> napisał(a):
> Do you have any stats about the performanceimprovement?

Workbench:
I am running curl against openssh 7.2 shipped with Ubuntu. The server
is running on the same machine as the client. I am uploading 1GB file
to /dev/null on the server. My laptop is running a 2nd gen i3 CPU
without hardware AES support. I'm tweaking network latency using tc.
Curl speed was taken from curl-reported average when the transfer took
less than a minute. For slower transfers I took a representative value
from the momentary upload speed.

Results with 16kB curl upload buffer:
no delay added: original 12MB/sec, patched 33 MB/sec
added 20 ms: original 390kB/sec, patched 26.6 MB/sec
added 100ms: original 81 kB/sec, patched 9700 kB/sec
Results with 64kB curl upload buffer:
no delay added: original 27MB/sec, patched 35 MB/sec
added 20 ms: original 1400kB/sec, patched 30MB/sec
added 100ms: original 310kB/sec, patched 9900kB/sec

The patched version is CPU-bound on lower latencies; when the latency
goes higher, SSH window becomes the limiting factor. I read that HPN
SSH should do better on high latency links, didn't try it out.

Separately I have a work-in-progress patch that improves the CPU
usage; I was able to reach 80MB/s transfers with that patch applied.
You can see it here:
https://github.com/djelinski/libssh2/commit/c321b5d3a0ed964b291c710179dde7385e514ef7
It's not ready for inclusion; it requires cleanup, and breaks SSL
backends other than openSSL with AES-CTR support. If you have openSSL
with AES support, it might be worth a try.

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