0

I have a lossy internet(12% package lost) at home,which leads a extremely slow speed for TCP connections between one of my fully controlled(root access) server and my computer.

Is there any workaround for a lossy network,so that the connection can be more reliable.It don't have to be global, just a tunnel is enough.

P.S.:I know this is partly because the way TCP deal with package lost, it assumes that package lost is because of the network have too many packages than it can handle, so it slow down its speed excepting to a better connectivity, but in my case, this became a nightmare to me.

1 Answer 1

1

This is kind of a theoretical answer, providing background to understand the problem:

From what you write, I assume you do not want to hear the answer "Get the connection fixed!", right?

So let's see what else we can do:

A large fraction of the packages are lost. The purpose of TCP/IP (Transmission Control Protocol) is to give you a connection that delivers data that is exactly what was send, and in the same order. You still get this from the connection in perfect quality, as long as the connection is not dropped.

But, obviously there is a compromise - the connection is slow.
Because it's really difficult to simulate a perfect connection over a connection that looses about 12% of it's data in some irregular way.

We do not expect magic, so some compromise needs to be accepted. One could ask whether it's possible to use something else that does what TCP/IP does, but faster.
For a general solution, we can just assume that TCP/IP nearly optimal, because lots of research over lots of time was spend on it.
(With a special solution for you connection, developed based on measurements on the connection, it can be faster for sure, and even faster if you use hardware adapted to your connection - but that direction makes not much sense here)

Now, all we can do is look for a different compromise:

The other end of the scale of compromises is a very fast connection, with - 12% package loss.
That is what you have if you do not use TCP/IP, but UDP/IP (User Datagram Protocol), which transfers separate packages for you, and gives no guarantee that they arrive in order, or at all.

In theory, you could have compromises with less package loss, and slower, in between, build on top of UDP/IP. But in many cases, only TCP/IP makes sense.

So, the practical anser is: "Get the connection fixed!"



Some practical notes:

Regarding why the connection get's slow: TCP can recognize when it sends too many packages, and slow down, but I do not think that's what is happening here. Loosing packages is a very different problem compared to sending too many packages.

I think the time is spend on retransmitting lost packages, and waiting for missing packages in between, that need to be delivered befor others that were already received.

As you did not say which kind of data you want to transfer: There are good reasons to prefer 12% packet loss over UDP/IP for some use cases:
It you transfer real time video from a camera, you only care about packets that arrive in time to be displayed on the screen. With TCP, the data would arrive complete and in order, but unuseable, because too late. Getting 88% of a video stream right in time is a lot better, it can even be enough for a good transmission.

3
  • To be short,the Bandwidth is the thing I wants to compromise. I am thinking write some code to send package more than once so that it can delver on time, failed at googling one,and decided ask here to know whether there is a solution exist. I live in China, where ISP(or government?) use package lost to make create artificial deceleration.I have asked ISP for help,and,of course in vain. Oct 1, 2014 at 14:24
  • Oh, yes, compromise on bandwidth for better latency makes sense. I had interpreted the "extremely slow connection" as low bandwith - is it just high latency? But I do not yet really get how that could work. Oct 1, 2014 at 14:33
  • It is just package lost. an average time for ping is 283ms but a heavy package lost is occurred. I have a 10 MiB/s(1.2MB/s) network but only for site within China, Whenever a connection cross the boundary it becomes 10~30 KB/s, so send a package many time and then discard the extra one received should work(as far as my imagine). Oct 1, 2014 at 14:47

You must log in to answer this question.

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