Linux – Download speed from server extremely slow

debianlinux

I have rented many servers @server4you and from time to I face the same problem. Download speed from a server decreases dramatically and after some weeks goes back to normal.

Now when I download a file from my Debian server, the speed is only 400-500 kbps.It's not my Internet connection problem. I tested it by downloading a file to anoher server in another data center. The same results.

There are no other problems with this server. The load is under 1, I have not installed any new software (only automatic updates).

Any ideas how to find out what can cause this problem?

Best Answer

There are lots of possible causes of the problem - the most likely being bottlnecks between providers, or between points of presence in a providers network.

There are a number of tools which can help with diagnosing the problems, but no single bullet. The easiest tool to use is MTR, which combines traceroute and ping to show latencies and packet loss. Its important to look at packet loss as it is very often associated with slowdowns - in fact the tcp protocol is built on the assumption that if the network is to slow it should discard the packet as a hint to slow down transmission.

(On the flip side of using MTR, it is possible to prioritise traffic to fool it - and not even deliberately sometimes - for example routers are better at forwarding packets then answering them.) That said, something like MTR is a very good tool.

The next tool to look at is something like iperf. This does bandwidth testing. It may be useful to know what happens with multiple concurrant connections - There is a loose correlation between the increases of total speed of concurrent connections and congestion - however latencies and distances also play a role.

You may also want to look at how busy your server is, If they are linux boxes, iptraf is a text base interface which can be useful, and is easy to run. There are plenty of other tools you could use as well.

Also, a note that the "load" does not neccessarily tell you anything about how loaded the system is - it is only a summary of the number of tasks waiting to be be handled. Its not useless, but it is entirely possible to see extremely high loads (hundreds) and still have great performance - depending on a number of factors - including bandwidth constraints, but also disk waits and simultaneous processes. Running programs like vmstat or iotop may give you better insites into what is going on.

Lastly, you talked about "a machine". Is this a real machine or a VM ? Its possible for a VM to look OK, but be constrained by overprovisioning / underperformance of the host.

Related Topic