1

I have a server with nginx installed on it to serve some files for downloading. I also didn't change default configuration of nginx.

Problem is that when I try to download from this server it seems there is a limitation for a connection because when I try to download with axel with 10 connection it's about 3X faster than wget with one connection.

How can I remove this limitation so that users can download with maximum speed from this server with one connection?

is Using axel faster because of my configuration or it's because of characteristic of network and internet?

UPDATE:

After first comment that indicates my comparison was wrong, I changed my test to axel -n 1 Vs. axel -n 10. Now there is no much difference between them but using more than one connection is still a little bit faster. (780KB/s for one connection and 830KB/s for ten connection).

Is this difference irrelevant to nginx configuration?

2
  • So you compare axel and wget and then come to the conclusion that there must be a problem in nginx? Wouldn't it be better to compare axel -n 1 and axel -n 10 for a start?
    – Oliver
    Jun 30, 2015 at 11:41
  • @Oliver you're right. My conclusion was incorrect. Now by comparing axel -n 1 and axel -n 10 difference isn't 3x. for one connection speed is 780 KB/s and for 10 connection speed is about 830 KB/s. Jun 30, 2015 at 12:09

1 Answer 1

0

This difference is probably not due to nginx, but more likely to your TCP stack (either on the client or on the server).

The most obvious difference is that by using 10 simultaneous connections, you will use up to 10 times as much memory for TCP buffers than with a single connection. This also means that by increasing the buffer size you have a good chance of improving the throughput of a single connection (at the same time you will probably reduce the number of connections your server can handle - there's always two sides to every story).

There are dozens of parameters for tuning the TCP stack. See the tcp(7) man page for more information.

If you just want to play with the buffer sizes you can do this through some files in /proc:

  • /proc/sys/net/core/rmem_max
  • /proc/sys/net/core/wmem_max
  • /proc/sys/net/ipv4/tcp_rmem
  • /proc/sys/net/ipv4/tcp_wmem

Don't forget this applies to the server as well as the client.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .