Sorry, I've upload my tests as attachments.
在 2018-01-04 07:04:38,"Ray Satiro via curl-library" <[email protected]> 写道: On 1/3/2018 3:22 AM, tanjj1990 wrote: I've googled it before I send this message,but I did'n get the way out. Here are some tests. May these tests are not rigorous, but they can show you my question: why can't I get the speed like chrome without proxy set? file size : 93582KB Box : https://app.box.com/folder/0 operating system windows server 2008 R2 standard Test1: libcurl compiler: vc=8 version: 7.57.0 openssl: 1.0.2n zlib: 1.2.11 case1: upload the file to Box, with libcurl: the speed is about 350KB/s; I tried the CURL_MAX_WRITE_SIZE: 16384, 32768, 65536, 131072, 262144, 524288, 1048576 case2: upload the file to Box, with libcurl, set proxy http://127.0.0.1:3213 : the acerage speed is about 6MB/s; case3: upload the file to Box, with chrome, no proxy : the speed is about 6MB/s -------------------------------------------------------------------------------------------------------------------------------- Test2: libcurl-command-line: upload the file to http://speedtest.tele2.net ~~~~~~~~~~~~~~~~~~~ \Desktop\libcurl-vc8-x86-release-dll-ssl-dll-zlib-dll-ipv6\ bin>curl -X POST --proxy http://127.0.0.1:3213 http://speedtest.tele2.net --dat a-binary @Server.exe -o result.txt % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 91.3M 0 8140 100 91.3M 508 5848k 0:00:16 0:00:16 --:--:-- 10.8M ~~~~~~~~~~~~~~~~~~~ \Desktop\libcurl-vc8-x86-release-dll-ssl-dll-zlib-dll-ipv6\ bin>curl -X POST http://speedtest.tele2.net --data-binary @Server.exe -o resu lt.txt % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 91.3M 0 8141 100 91.3M 30 355k 0:04:23 0:04:23 --:--:-- 345k -------------------------------------------------------------------------------------------------------------------------------------- Test3: curl: download from https://curl.haxx.se/download.html version: Win64 x86_64 7zip7.57.0binarySSLSSHViktor Szakáts1.88 MB the speed upload to Box is same as libcurl; other cases: upload the file to http://speedtest.tele2.net ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\curl-7.57.0-win64-mingw\curl-7.57.0-wi n64-mingw\bin>curl -X POST --proxy http://127.0.0.1:3213 http://speedtest.tele2 .net --data-binary @ABServer.exe -o result.txt % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 91.3M 0 8140 100 91.3M 542 6238k 0:00:15 0:00:15 --:--:-- 11.6M ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~curl-7.57.0-win64-mingw\curl-7.57.0-wi n64-mingw\bin>curl -X POST http://speedtest.tele2.net --data-binary @ABServer.e xe -o result.txt % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 91.3M 0 8141 100 91.3M 29 335k 0:04:39 0:04:39 --:--:-- 317k -------------------------------------------------------------------------------------------------------------------------------------------------- That's weird, I don't know what could be causing it. Does Chrome use the proxy? Can you try this PostUpload test [1] with and without the proxy? [1]: https://gist.github.com/jay/daac01682f17c2dc213e
--------------------------------------------------------------------------------------------------- upload to box - chrome - no proxy 50MB in 6.41sec 50MB in 6.67sec 50MB in 5.78sec 50MB in 6.20sec 50MB in 6.38sec --------------------------------------------------------------------------------------------------- upload to box - chrome - proxy set 50MB in 8.54sec 50MB in 7.58sec 50MB in 5.87sec 50MB in 9.00sec 50MB in 6.48sec --------------------------------------------------------------------------------------------------- upload to box - curl download from https://curl.haxx.se/download.html#Win64 - no proxy ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\curl-7.57.0-wi n64-mingw\bin>curl https://upload.box.com/api/2.0/files/content -H "Authorizatio n:Bearer access~~~~~~~~~~~~~~~~~~~~~~~~~~" -X POST -F attributes="{\"name\":\"ul speedtest\",\"parent\":{\"id\":\"0\"}}" -F file=@ulspeedtest -o result.txt % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 50.0M 100 1058 100 50.0M 6 314k 0:02:56 0:02:43 0:00:13 271k 100 50.0M 100 1058 100 50.0M 6 316k 0:02:56 0:02:42 0:00:14 271k 100 50.0M 100 1058 100 50.0M 6 320k 0:02:56 0:02:40 0:00:16 265k 100 50.0M 100 1058 100 50.0M 7 365k 0:02:31 0:02:20 0:00:11 314k 100 50.0M 100 1058 100 50.0M 7 360k 0:02:31 0:02:22 0:00:09 272k --------------------------------------------------------------------------------------------------- upload to box - curl download from https://curl.haxx.se/download.html#Win64 - proxy set ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\curl-7.57.0-wi n64-mingw\bin>curl https://upload.box.com/api/2.0/files/content -H "Authorizatio n:Bearer access~~~~~~~~~~~~~~~~~~~~~~~~~~" -X POST --proxy http://127.0.0.1:3213 -F attributes="{\"name\":\"ulspeedtest\",\"parent\":{\"id\":\"0\"}}" -F file=@u lspeedtest -o result.txt % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 50.0M 100 1058 100 50.0M 88 4266k 0:00:12 0:00:12 --:--:-- 201k 100 50.0M 100 1058 100 50.0M 37 1828k 0:00:28 0:00:28 --:--:-- 1188k 100 50.0M 100 1058 100 50.0M 117 5688k 0:00:09 0:00:09 --:--:-- 9652k 100 50.0M 100 1058 100 50.0M 132 6400k 0:00:08 0:00:08 --:--:-- 8721k 100 50.0M 100 1058 100 50.0M 70 3413k 0:00:15 0:00:15 --:--:-- 6188k --------------------------------------------------------------------------------------------------- upload to box - curl compiled myself - no proxy ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\libcurl-vc8-x86-release-dll-ssl-dll-zl ib-dll-ipv6\bin>curl https://upload.box.com/api/2.0/files/content -H "Authorizat ion:Bearer access~~~~~~~~~~~~~~~~~~~~~~~~~~" -X POST --cacert cacert.pem -F attr ibutes="{\"name\":\"ulspeedtest\",\"parent\":{\"id\":\"0\"}}" -F file=@ulspeedte st -o result.txt % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 50.0M 100 1058 100 50.0M 6 314k 0:02:56 0:02:43 0:00:13 258k 100 50.0M 100 1058 100 50.0M 7 345k 0:02:31 0:02:28 0:00:03 321k 100 50.0M 100 1058 100 50.0M 7 363k 0:02:31 0:02:21 0:00:10 305k 100 50.0M 100 1058 100 50.0M 6 324k 0:02:56 0:02:38 0:00:18 285k 100 50.0M 100 1058 100 50.0M 7 365k 0:02:31 0:02:20 0:00:11 308k --------------------------------------------------------------------------------------------------- upload to box - curl compiled myself - proxy set ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\libcurl-vc8-x86-release-dll-ssl-dll-zl ib-dll-ipv6\bin>curl https://upload.box.com/api/2.0/files/content -H "Authorizat ion:Bearer access~~~~~~~~~~~~~~~~~~~~~~~~~~" -X POST --cacert cacert.pem --proxy http://127.0.0.1:3213 -F attributes="{\"name\":\"ulspeedtest\",\"parent\":{\"id \":\"0\"}}" -F file=@ulspeedtest -o result.txt % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 50.0M 100 1058 100 50.0M 55 2694k 0:00:19 0:00:19 --:--:-- 3239k 100 50.0M 100 1058 100 50.0M 48 2327k 0:00:22 0:00:22 --:--:-- 1961k 100 50.0M 100 1058 100 50.0M 105 5120k 0:00:10 0:00:10 --:--:-- 9434k 100 50.0M 100 1058 100 50.0M 58 2844k 0:00:18 0:00:18 --:--:-- 5586k 100 50.0M 100 1058 100 50.0M 117 5688k 0:00:09 0:00:09 --:--:-- 4332k --------------------------------------------------------------------------------------------------- upload to box - PostUpload.c - no proxy edit PostUpload.c: curl_easy_setopt(curl, CURLOPT_NOPROGRESS, 0L); curl_easy_setopt(curl, CURLOPT_XFERINFOFUNCTION, progress_callback); curl_easy_setopt(curl, CURLOPT_XFERINFODATA, &progress_data); progress_data.session = curl; /* test - upload file to box */ header_list = curl_slist_append(header_list, "Authorization: Bearer MDU2VZdbuWl8aSKuWyA34yNCEldLODqO"); curl_easy_setopt(curl, CURLOPT_HTTPHEADER, header_list); curl_httppost *post = NULL; curl_httppost *last = NULL; curl_formadd(&post, &last, CURLFORM_COPYNAME, "attributes", CURLFORM_COPYCONTENTS, "{\"name\":\"ulspeedtest\", \"parent\":{\"id\":\"0\"}}", CURLFORM_END); curl_formadd(&post, &last, CURLFORM_STREAM, fp, CURLFORM_PTRNAME, "file", CURLFORM_FILENAME, "ulspeedtest", CURLFORM_CONTENTLEN, (curl_off_t)stbuf.st_size, CURLFORM_END); curl_easy_setopt(curl, CURLOPT_HTTPPOST, post); Transfer rate: 361 KB/sec (52429188 bytes in 142 seconds) Other data rate units: 2.95 Mbps 2953.75 kbps 0.35 MiB/s 360.57 KiB/s 369.22 kB/s 369219.00 B/s Transfer rate: 316 KB/sec (52429188 bytes in 162 seconds) Other data rate units: 2.59 Mbps 2589.09 kbps 0.31 MiB/s 316.05 KiB/s 323.64 kB/s 323636.00 B/s Transfer rate: 318 KB/sec (52429188 bytes in 161 seconds) Other data rate units: 2.61 Mbps 2605.18 kbps 0.31 MiB/s 318.01 KiB/s 325.65 kB/s 325647.00 B/s Transfer rate: 318 KB/sec (52429188 bytes in 161 seconds) Other data rate units: 2.61 Mbps 2605.18 kbps 0.31 MiB/s 318.01 KiB/s 325.65 kB/s 325647.00 B/s Transfer rate: 322 KB/sec (52429188 bytes in 160 seconds) Other data rate units: 2.64 Mbps 2637.94 kbps 0.31 MiB/s 322.01 KiB/s 329.74 kB/s 329743.00 B/s --------------------------------------------------------------------------------------------------- upload to box - PostUpload.c - proxy set add code to PostUpload.c before: /* test - proxy */ curl_easy_setopt(curl, CURLOPT_PROXYTYPE, CURLPROXY_HTTP); curl_easy_setopt(curl, CURLOPT_PROXY, "127.0.0.1:3213"); Transfer rate: 1896 KB/sec (52429188 bytes in 27 seconds) Other data rate units: 15.53 Mbps 15534.57 kbps 1.85 MiB/s 1896.31 KiB/s 1941.82 kB/s 1941821.00 B/s Transfer rate: 1896 KB/sec (52429188 bytes in 28 seconds) Other data rate units: 15.53 Mbps 15534.57 kbps 1.85 MiB/s 1896.31 KiB/s 1941.82 kB/s 1941821.00 B/s Transfer rate: 4267 KB/sec (52429188 bytes in 13 seconds) Other data rate units: 34.95 Mbps 34952.79 kbps 4.17 MiB/s 4266.70 KiB/s 4369.10 kB/s 4369099.00 B/s Transfer rate: 3938 KB/sec (52429188 bytes in 13 seconds) Other data rate units: 32.26 Mbps 32264.11 kbps 3.85 MiB/s 3938.49 KiB/s 4033.01 kB/s 4033014.00 B/s Transfer rate: 7314 KB/sec (52429188 bytes in 7 seconds) Other data rate units: 59.92 Mbps 59919.07 kbps 7.14 MiB/s 7314.34 KiB/s 7489.88 kB/s 7489884.00 B/s
---------------------------------------------------------------------------------------------------------------------- https://testmy.net/results - no proxy Upload Connection Speed:: 9376 kbps or 9.4 Mbps Upload Speed Test Size:: 50 MB or 51200 kB or 52428800 bytes Upload Binary File Transfer Speed:: 1172 kB/s or 1.2 MB/s Upload Connection Speed:: 18967 kbps or 19 Mbps Upload Speed Test Size:: 50 MB or 51200 kB or 52428800 bytes Upload Binary File Transfer Speed:: 2371 kB/s or 2.4 MB/s Upload Connection Speed:: 18489 kbps or 18.5 Mbps Upload Speed Test Size:: 50 MB or 51200 kB or 52428800 bytes Upload Binary File Transfer Speed:: 2311 kB/s or 2.3 MB/s Upload Connection Speed:: 21906 kbps or 21.9 Mbps Upload Speed Test Size:: 50 MB or 51200 kB or 52428800 bytes Upload Binary File Transfer Speed:: 2738 kB/s or 2.7 MB/s Upload Connection Speed:: 22085 kbps or 22.1 Mbps Upload Speed Test Size:: 50 MB or 51200 kB or 52428800 bytes Upload Binary File Transfer Speed:: 2761 kB/s or 2.8 MB/s Upload Connection Speed:: 18264 kbps or 18.3 Mbps Upload Speed Test Size:: 50 MB or 51200 kB or 52428800 bytes Upload Binary File Transfer Speed:: 2283 kB/s or 2.3 MB/s ---------------------------------------------------------------------------------------------------------------------- https://testmy.net/results - proxy set Upload Connection Speed:: 24393 kbps or 24.4 Mbps Upload Speed Test Size:: 50 MB or 51200 kB or 52428800 bytes Upload Binary File Transfer Speed:: 3049 kB/s or 3 MB/s Upload Connection Speed:: 14639 kbps or 14.6 Mbps Upload Speed Test Size:: 50 MB or 51200 kB or 52428800 bytes Upload Binary File Transfer Speed:: 1830 kB/s or 1.8 MB/s Upload Connection Speed:: 28906 kbps or 28.9 Mbps Upload Speed Test Size:: 50 MB or 51200 kB or 52428800 bytes Upload Binary File Transfer Speed:: 3613 kB/s or 3.6 MB/s Upload Connection Speed:: 20029 kbps or 20 Mbps Upload Speed Test Size:: 50 MB or 51200 kB or 52428800 bytes Upload Binary File Transfer Speed:: 2504 kB/s or 2.5 MB/s Upload Connection Speed:: 28302 kbps or 28.3 Mbps Upload Speed Test Size:: 50 MB or 51200 kB or 52428800 bytes Upload Binary File Transfer Speed:: 3538 kB/s or 3.5 MB/s ---------------------------------------------------------------------------------------------------------------------- upload to http://ny.testmy.net/uploader - curl down from https://curl.haxx.se/download.html#Win64 - no proxy ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\curl-7.57.0-wi n64-mingw\bin>curl -X POST http://ny.testmy.net/uploader --data-binary @ulspeedt est -o result.txt % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 50.0M 100 3188 100 50.0M 132 2133k 0:00:24 0:00:24 --:--:-- 2129k 100 50.0M 100 3188 100 50.0M 127 2048k 0:00:25 0:00:25 --:--:-- 1857k 100 50.0M 100 3188 100 50.0M 122 1969k 0:00:26 0:00:26 --:--:-- 1657k 100 50.0M 100 3188 100 50.0M 127 2048k 0:00:25 0:00:25 --:--:-- 1963k 100 50.0M 100 3188 100 50.0M 113 1828k 0:00:28 0:00:28 --:--:-- 1727k ---------------------------------------------------------------------------------------------------------------------- upload to http://ny.testmy.net/uploader - curl down from https://curl.haxx.se/download.html#Win64 - proxy set ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\curl-7.57.0-wi n64-mingw\bin>curl http://ny2.testmy.net/uploader -X POST --proxy http://127.0.0 .1:3213 --data-binary @ulspeedtest -o result.txt % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 50.0M 0 0 0 208k 0 208k 0:04:06 0:00:01 0:04:05 110k curl: (56) Recv failure: Connection was aborted ---------------------------------------------------------------------------------------------------------------------- upload to http://ny.testmy.net/uploader - curl compiled myself - no proxy ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\libcurl-vc8-x86-release-dll-ssl-dll-zl ib-dll-ipv6\bin>curl -X POST http://ny2.testmy.net/uploader --data-binary @ulspe edtest -o result.txt % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 50.0M 100 3188 100 50.0M 99 1600k 0:00:32 0:00:32 --:--:-- 1577k 100 50.0M 100 3188 100 50.0M 106 1706k 0:00:30 0:00:30 --:--:-- 1491k 100 50.0M 100 3188 100 50.0M 106 1706k 0:00:30 0:00:30 --:--:-- 1754k 100 50.0M 100 3188 100 50.0M 127 2048k 0:00:25 0:00:25 --:--:-- 1980k 100 50.0M 100 3188 100 50.0M 113 1828k 0:00:28 0:00:28 --:--:-- 1985k C:\Users\AOMEITECHONE\Desktop\test_upload\libcurl-vc8-x86-release-dll-ssl-dll-zl ib-dll-ipv6\bin> ---------------------------------------------------------------------------------------------------------------------- upload to http://ny.testmy.net/uploader - curl compiled myself - proxy set ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\libcurl-vc8-x86-release-dll-ssl-dll-zl ib-dll-ipv6\bin>curl http://ny2.testmy.net/uploader -X POST --proxy http://127.0 .0.1:3213 --data-binary @ulspeedtest -o result.txt % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 50.0M 0 0 0 240k 0 240k 0:03:33 0:00:01 0:03:32 137k curl: (56) Recv failure: Connection was reset ---------------------------------------------------------------------------------------------------------------------- upload to http://ny.testmy.net/uploader - PostUpload.c - no proxy Transfer rate: 2133 KB/sec (52428883 bytes in 24 seconds) Other data rate units: 17.48 Mbps 17476.29 kbps 2.08 MiB/s 2133.34 KiB/s 2184.54 kB/s 2184536.00 B/s Transfer rate: 2048 KB/sec (52428883 bytes in 26 seconds) Other data rate units: 16.78 Mbps 16777.24 kbps 2.00 MiB/s 2048.00 KiB/s 2097.16 kB/s 2097155.00 B/s Transfer rate: 1969 KB/sec (52428883 bytes in 27 seconds) Other data rate units: 16.13 Mbps 16131.96 kbps 1.92 MiB/s 1969.23 KiB/s 2016.49 kB/s 2016495.00 B/s Transfer rate: 2438 KB/sec (52428883 bytes in 22 seconds) Other data rate units: 19.97 Mbps 19972.90 kbps 2.38 MiB/s 2438.10 KiB/s 2496.61 kB/s 2496613.00 B/s Transfer rate: 1896 KB/sec (52428883 bytes in 27 seconds) Other data rate units: 15.53 Mbps 15534.48 kbps 1.85 MiB/s 1896.30 KiB/s 1941.81 kB/s 1941810.00 B/s ---------------------------------------------------------------------------------------------------------------------- upload to http://ny.testmy.net/uploader - PostUpload.c - proxy set add code to PostUpload.c: /* test - proxy */ curl_easy_setopt(curl, CURLOPT_PROXYTYPE, CURLPROXY_HTTP); curl_easy_setopt(curl, CURLOPT_PROXY, "127.0.0.1:3213"); Transfer rate: 17067 KB/sec (52428883 bytes in 4 seconds) Other data rate units: 139.81 Mbps 139810.35 kbps 16.67 MiB/s 17066.69 KiB/s 17476.29 kB/s 17476294.00 B/s Transfer rate: 6400 KB/sec (52428883 bytes in 8 seconds) Other data rate units: 52.43 Mbps 52428.88 kbps 6.25 MiB/s 6400.01 KiB/s 6553.61 kB/s 6553610.00 B/s Transfer rate: 6400 KB/sec (52428883 bytes in 9 seconds) Other data rate units: 52.43 Mbps 52428.88 kbps 6.25 MiB/s 6400.01 KiB/s 6553.61 kB/s 6553610.00 B/s Transfer rate: 17067 KB/sec (52428883 bytes in 4 seconds) Other data rate units: 139.81 Mbps 139810.35 kbps 16.67 MiB/s 17066.69 KiB/s 17476.29 kB/s 17476294.00 B/s Transfer rate: 12800 KB/sec (52428883 bytes in 4 seconds) Other data rate units: 104.86 Mbps 104857.76 kbps 12.50 MiB/s 12800.02 KiB/s 13107.22 kB/s 13107220.00 B/s
------------------------------------------------------------------- Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library Etiquette: https://curl.haxx.se/mail/etiquette.html
