TCP-induced packet loss compared to UDP and undergraduate recommendations

Currently I am writing a bachelor's degree in computer science and technology, we are creating a racing game in C ++ using OpenGL. In the report, I compare the use of TCP and UDP, and I found a source that claimed that several TCP connections could cause packet loss in the UDP connection. I even got a good link

The problem is that she is 13 years old, but I could not find any indication that any protocol changed this problem. I also could not find any article or article that is more relevant that conduct similar research.

So my questions are about whether there have been any changes in the protocols that may be relevant, and / or if I just forget about using this old link in the thesis report.

+4
source share
1 answer

Read the important points in the article:

  • At first, we focused on the case when only TCP connections use the entire network bandwidth.
  • With an increase in the number of TCP connections, a larger number of packets can simultaneously arrive at the node, thereby making the buffer very congested and, thus, reduces packet loss more often.

Thus, the tested WAN line is saturated, and testing is fair for the TCP and UDP protocols. Article 29 West, mentioned in the comments, also states:

Myth - there are no losses in networks that work properly.

Reality - Normal operation of TCP congestion control can result in a queue overflow. See this report for more information. Loss ratios of a few percent were heavy congestion.

None of this is particularly new or should be surprising to anyone. Consider a home Internet connection, DSL or cable with minimal speed, for example. 2 MB / s and set up a single computer with Bittorrent downloading several large files, now try to run a UDP game such as Valve Team Fortress 2. This will not work well.

With VoIP, many netizens have begun to learn how to improve this situation, which bring QoS to the table. However, QoS requires collaboration at both ends of the WAN, so it is not beneficial to most end users. The only real solution is bandwidth throttling. If you have a 2mb link, you set up TCP traffic to say 1.5 MB, and leave the rest for UDP traffic for games.

If you are developing a game with a shared protocol, you must define an upper bandwidth limit of, say, 25 KB / s per client for total traffic, and then define separate limits for TCP and UDP traffic within this limit, for example. 15 KB / s for TCP and 10 KB / s for UDP. Typically, games typically use HTTP (TCP) to download game content outside the game, and then switch to UDP inside the game to completely remove the problem.

+1
source

Source: https://habr.com/ru/post/1346034/


All Articles