I did this
Make sure you have a file URL with high download speed; a local disk, and a network SMB resource with high upload speed (either mapped as a disk letter, or accessible via network share URI).
First, try to download the file with --output option pointing onto a file located on the local disk, and mark the speed (might need a few seconds for it to stabilize).
Second, try the same, but with --output pointing to the SMB share, and compare the speed.
In my example, I set up a local HTTP server using python -mhttp.server for a directory with some Linux ISO distributions on my local hard drive (max speed for downloading is 250-300 Mbytes/s); and for the destination I used an SMB share on my locally running CentOS 7 virtual machine (transfer speed varies, but is about 100-250 Mbytes/s). This way I made sure I'm not throttled by my ISP, or the upstream server. But my friend found this issue when downloading a file from Internet via 500 Mbps connection onto his NAS, so it doesn't have to be all local.
My results:
C:\Programs\curl>curl "http://127.0.0.1:8000/ubuntu-22.04.2-desktop-amd64.iso" -o c:\Temp\a.iso
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 4699M 100 4699M 0 0 244M 0 0:00:19 0:00:19 --:--:-- 255M
C:\Programs\curl>curl "http://127.0.0.1:8000/ubuntu-22.04.2-desktop-amd64.iso" -o \\192.168.56.101\flint\tmp\a.iso
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 4699M 100 4699M 0 0 22.6M 0 0:03:27 0:03:27 --:--:-- 22.7M
In other words, the speed is over 10 times lower when saving onto SMB. To confirm that the SMB itself is not slow, here is the measurement of direct copy of the same file to the same SMB location:
C:\Programs\curl>dir D:\Distribs\OS\ubuntu-20.04.6-live-server-amd64.iso & echo %TIME% & copy D:\Distribs\OS\ubuntu-20.04.6-live-server-amd64.iso \\192.168.56.101\flint\tmp\a.iso & cmd /v:on /c "echo !TIME!"
Volume in drive D has no label.
Volume Serial Number is 2461-9C46
Directory of D:\Distribs\OS
25.07.2023 23:56 1 487 339 520 ubuntu-20.04.6-live-server-amd64.iso
1 File(s) 1 487 339 520 bytes
0 Dir(s) 1 267 068 116 992 bytes free
20:52:03,98
1 file(s) copied.
20:52:15,63
which gives us about 122 Mbytes/s. (And it's not because of caching; I monitored for network activity, and it stopped as soon as the file copying finished.)
I expected the following
The download speed onto SMB should be roughly 100-200 Mbytes/s, as the hardware permits.
curl/libcurl version
Reproduced on several different builds:
curl 8.5.0 (x86_64-w64-mingw32) libcurl/8.5.0 LibreSSL/3.8.2 (Schannel) zlib/1.3 brotli/1.1.0 zstd/1.5.5 WinIDN libssh2/1.11.0 nghttp2/1.58.0 ngtcp2/1.1.0 nghttp3/1.1.0
Release-Date: 2023-12-06
Protocols: dict file ftp ftps gopher gophers http https imap imaps ldap ldaps mqtt pop3 pop3s rtsp scp sftp smb smbs smtp smtps telnet tftp ws wss
Features: alt-svc AsynchDNS brotli HSTS HTTP2 HTTP3 HTTPS-proxy IDN IPv6 Kerberos Largefile libz MultiSSL NTLM SPNEGO SSL SSPI threadsafe UnixSockets zstd
- Preinstalled in Windows 11:
curl 8.4.0 (Windows) libcurl/8.4.0 Schannel WinIDN
Release-Date: 2023-10-11
Protocols: dict file ftp ftps http https imap imaps pop3 pop3s smtp smtps telnet tftp
Features: AsynchDNS HSTS HTTPS-proxy IDN IPv6 Kerberos Largefile NTLM SPNEGO SSL SSPI threadsafe Unicode UnixSockets
- Built from source using Visual Studio:
curl 8.5.0 (x86_64-pc-win32) libcurl/8.5.0 OpenSSL/3.2.0 zlib/1.3
Release-Date: 2023-12-06
Protocols: dict file ftp ftps gopher gophers http https imap imaps ldap ldaps mqtt pop3 pop3s rtsp smb smbs smtp smtps telnet tftp
Features: alt-svc AsynchDNS HSTS HTTPS-proxy IPv6 Largefile libz NTLM SSL threadsafe UnixSockets
operating system
Windows 10 22H2 Pro x64 (10.0.19045.3570)
Windows 11 23H2 Pro x64 (10.0.22631.3007)
I did this
Make sure you have a file URL with high download speed; a local disk, and a network SMB resource with high upload speed (either mapped as a disk letter, or accessible via network share URI).
First, try to download the file with
--outputoption pointing onto a file located on the local disk, and mark the speed (might need a few seconds for it to stabilize).Second, try the same, but with
--outputpointing to the SMB share, and compare the speed.In my example, I set up a local HTTP server using
python -mhttp.serverfor a directory with some Linux ISO distributions on my local hard drive (max speed for downloading is 250-300 Mbytes/s); and for the destination I used an SMB share on my locally running CentOS 7 virtual machine (transfer speed varies, but is about 100-250 Mbytes/s). This way I made sure I'm not throttled by my ISP, or the upstream server. But my friend found this issue when downloading a file from Internet via 500 Mbps connection onto his NAS, so it doesn't have to be all local.My results:
In other words, the speed is over 10 times lower when saving onto SMB. To confirm that the SMB itself is not slow, here is the measurement of direct copy of the same file to the same SMB location:
which gives us about 122 Mbytes/s. (And it's not because of caching; I monitored for network activity, and it stopped as soon as the file copying finished.)
I expected the following
The download speed onto SMB should be roughly 100-200 Mbytes/s, as the hardware permits.
curl/libcurl version
Reproduced on several different builds:
operating system
Windows 10 22H2 Pro x64 (10.0.19045.3570)
Windows 11 23H2 Pro x64 (10.0.22631.3007)