I have 2 servers in Singapore and Canada.

Both pass local speed tests of ~100mbit/sec, but when transferring files between them, speeds can be as low as 20kb/sec.

The Singapore server can still transfer with reasonable speed (~50mbit/sec) to e.g. Japan, and Japan in turn has similar speed to Canada. So when building a "chain" of "relay servers" I can achieve pretty good speeds (even though I have to copy the files multiple times). Why is this the case? Why is a direct connection between Singapore and Canada slower?

So when building a "chain solution", is there a way to calculate speeds professionally instead of guessing geographical points?

Are there any common solutions to problems like this that I overlooked?

  • My guess is that there's a large latency hop on the route. Run a traceroute from one server to the other and check for large steps or even packet loss. As Viktor's pointed out, the RTT or latency limits your throughput for a give window size. If only latency is a problem you need to increase the window size ie. activate the window scale option on both sides. If there's packet loss you might want to talk to your ISP. – Zac67 Jun 3 '17 at 11:07
  • Unfortunately, you do not control the Internet, and questions about networks over which you have no direct control are explicitly off-topic here, as are questions about servers and protocols above OSI layer-4. You could try to ask this question on Server Fault. – Ron Maupin Jun 3 '17 at 12:50

The practical rule for latency calculation is ~0.3 ms for every 100km. In other words for the distance between Singapore and Canada (13 000 km straight line) the latency should be around 390ms. I assume it is little bit lower. You can measure it by using ping. The output will give you the RTT. Once you have that value you can use following calculator:


So if we consider that you really have 100Mbit/s international traffic available and default TCP window size of 64kbyte you will get following as speed:

  • BDP (100 Mbit/sec, 390.0 ms) = 4.88 MByte

  • Required tcp buffer to reach 100 Mbps with RTT of 390.0 ms >= 4760.7 KByte

  • Maximum throughput with a TCP window of 64 KByte and RTT of 390.0 ms <= 1.34 Mbit/sec.

In order to increase the transfer speed you have to:

  • increase TCP window size ( ensure that window scaling is enabled)
  • optimize buffers
  • reduce packet loss and latency if possible ( by raising cases to your ISPs)

If you really want to explore the topic for measuring optimizing TCP perfromance I'd recommend to read RFC-6349

| improve this answer | |
  • Awesome input, thank you! Can a larger window size slow my connection down in case of packet loss? Besides this, do you see any other potential side-effects or disadvantages, and is there a specific value that you would recommend for "safe use"? – J.Doe Jun 4 '17 at 6:22
  • Window size is a dynamic value changing all the time. ( Great explanation can be found here: mathcs.emory.edu/~cheung/Courses/558a/Syllabus/6-transport/… ). Your task is to ensure that window scaling is enabled. The rest will be handled dynamically. – Viktor Borisov Jun 4 '17 at 19:32

Not the answer you're looking for? Browse other questions tagged or ask your own question.