0

According to this website, as soon as round-trip time is increased, we lose a bit of our real-time capacity throughput to distant servers using default TCP Window size of 64KB.

My network bandwidth is 240mb/60mb down/up. I live in a third-world country where all CDN servers available is 2000-4000km away from me, and my round-trip time to the closest CDN server is 82ms which means my maximum attainable speed due to distance is just around ~6Mbit/s assuming the server is using default 64KB TCP window size.

I understand that opening multi download streams to certain server can help achieve max bandwidth, but sadly even with having simultaneous 32 streams at once, my download speed is still not able to reach max potential speed to the distant server.

So what can I do in this case to achieve full speeds to those servers assuming no local server is available?

2

TCP uses window size and it's built-in ramp-up process, and increasing the window size is the first step to send bigger packets on the same path and thus have bigger and more packets "on-the-wire" and not having to wait for them to be received and then acknowledged. Another way to not have to worry about the ramp-up and other TCP mechanisms is to tunnel your traffic over a more effective protocol like UDP (as long as you don't suffer from transmission errors like drops etc), and therefor optimize the traffic by using a tunnel that is already running "optimally" with full performance and no handshaking needed.

In Linux you can increase the memory for the send buffers, start by looking at net.core.rmem_max/wmem. It could be worth to look at other guides around performance optimisation, if you are indeed running Linux: Sane value for net.ipv4.tcp_max_syn_backlog in sysctl.conf or search for "tune linux for high latency connections".

I don't have much experience with windows, so if that is what you are using then you are on your own, but I assume there are loads of information regarding the network stack optimisation there as well, I just can't point to them.

1
1

The default TCP Window Size maximum is 64 kilobytes. However, it was realised long time ago that it is insufficient for today's networking requirements.

Therefore TCP Window Scaling was invented and documented in RFC 1323. It specifies a scaling factor starting from 1 and ending up to 16384. This means that maximum effective TCP Window Size can be 16384 * 65535 bytes = 1,073,725,440 bytes, that is, one gigabyte.

The actual window scaling factor is determined in the TCP handshake, and the scaling factor is used through the connection.

You can use WireShark to examine what is the true TCP Window Size in your TCP connections.

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