Slow file download performance
1. What version of Caddy are you using (caddy -version)?
0.11.0
2. What are you trying to do?
Get better file download performance
3. What is your entire Caddyfile?
0.0.0.0
browse
4. How did you run Caddy (give the full command and describe the execution environment)?
sudo docker run -d --name=caddy
-v $HOME/.caddy:/root/.caddy
-v $(pwd)/Caddyfile:/etc/Caddyfile
-v $(pwd)/srv:/srv
-p 2015:2015
abiosoft/caddy
5. Please paste any relevant HTTP request(s) here.
aria2c xxxxxx/file is slower than aria2c -x 5 xxxxxx/file multiple connections
aria2 is a downloader
6. What did you expect to see?
similar file download performance to nginx
7. What did you see instead (give full error messages and/or log)?
slow downloads
8. How can someone who is starting from scratch reproduce the bug as minimally as possible?
sudo docker run -d --name=caddy
-v $HOME/.caddy:/root/.caddy
-v $(pwd)/Caddyfile:/etc/Caddyfile
-v $(pwd)/srv:/srv
-p 2015:2015
abiosoft/caddy
0.0.0.0
browse
on srv folder put a big file, download file with browser or aria2c no multiple connections slow download, download with aria2c -x 5 multiple connections much better performance, i have already tried with encruption 443 80 port etc it is always slower with one connection, nginx is much faster on one connection
During my tests I have not experienced a significant speed difference between Caddy and Nginx with less than 10K req/sec. The following results show the benchmarks of a single wget pull between two(2) servers on different networks and NICs.
Summery:
Internet 1gig = 74 MB/s
LAN 1gig = 109 MB/s
LAN 10gig = 303 MB/s
Caddy Server hardware:
FreeBSD 11.2
Intel Core i5 - simultaneous multithreading (SMT) disabled
32 gig system RAM
1TB NVMe drive
Chelsio 10g NIC
HTTP/2.0 over TCP (QUIC v39 unused when Chrome v68 released)
Caddy 0.11.0
Client, Internet connected one(1) gigabit link , 21ms latency between hosts
$ wget -O /dev/null https://example.org/caddy_speed_test_dev_random
--2018-07-25 11:10:36 - https://example.org/caddy_speed_test_dev_random
HTTP request sent, awaiting response... 200 OK
Length: 1735284402 (1.6G) [application/zip]
Saving to: ‘/dev/null’
/dev/null 100%[========>] 1.62G 74.6MB/s in 23s
Client, LAN internet connected one(1) gigabit link , 0.012ms latency between hosts
$ wget -O /dev/null https://example.org/caddy_speed_test_dev_random
--2018-07-25 11:12:12 - https://example.org/caddy_speed_test_dev_random
HTTP request sent, awaiting response... 200 OK
Length: 1735284402 (1.6G) [application/zip]
Saving to: ‘/dev/null’
/dev/null 100%[========>] 1.62G 109MB/s in 15s
Client, LAN internet connected ten(10) gigabit link , 0.012ms latency between hosts
(throughput limited by the speed of a single Go thread on a single CPU core)
$ wget -O /dev/null https://example.org/caddy_speed_test_dev_random
--2018-07-25 11:15:27 - https://example.org/caddy_speed_test_dev_random
HTTP request sent, awaiting response... 200 OK
Length: 1735284402 (1.6G) [application/zip]
Saving to: ‘/dev/null’
/dev/null 100%[========>] 1.62G 303MB/s in 5.5s
I was just searching for this because for the past week my download speeds have been ridiculously slow too. Almost 3 times slower usual.
Ran speed tests on the server, no problems there. I download some test file on my pc, no problem there. Heck, i download faster through SFTP now.
I think this issue would be better discussed at https://caddy.community/
Did you set file descriptor to 8192(ulimit -n 8192)?