curl / Mailing Lists / curl-library / Single Mail

curl-library

Re: Windows users! Help us test upload performance tuning?

From: Daniel Stenberg via curl-library <curl-library_at_cool.haxx.se>
Date: Thu, 9 Aug 2018 16:55:38 +0200 (CEST)

On Thu, 9 Aug 2018, Jan Ehrhardt via curl-library wrote:

> curl plain ftp patched 41 seconds
> curl patched sftp 1925 seconds

Oh what a sad number there... =(

A quick little experiment could be to try upping the upload buffer size
significantly:

diff --git a/lib/urldata.h b/lib/urldata.h
index 7d396f3f2..ccfe83b3b 100644
--- a/lib/urldata.h
+++ b/lib/urldata.h
@@ -142,11 +142,11 @@ typedef ssize_t (Curl_recv)(struct connectdata *conn, /*
connection data */
  #include <libssh2_sftp.h>
  #endif /* HAVE_LIBSSH2_H */

  /* The upload buffer size, should not be smaller than CURL_MAX_WRITE_SIZE, as
     it needs to hold a full buffer as could be sent in a write callback */
-#define UPLOAD_BUFSIZE CURL_MAX_WRITE_SIZE
+#define UPLOAD_BUFSIZE (512*1024)

  /* The "master buffer" is for HTTP pipelining */
  #define MASTERBUF_SIZE 16384

  /* Initial size of the buffer to store headers in, it'll be enlarged in case

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