How does sending tinygrams cause network congestion?

In many places, I read tips that sending a large number of small packets will lead to network congestion. I even experienced this with the recent tcp multi-threaded application that I wrote. However, I do not know if I understand the exact mechanism by which this happens.

My initial guess is that if the MTU of the physical transmission medium is fixed and you send a bunch of small packets, then each packet can potentially capture the entire transmission frame on the physical medium.

For example, I understand that even though Ethernet supports variable frames, most equipment uses a fixed Ethernet frame of 1,500 bytes. At 100 Mbps, a 1,500-byte frame "sweeps" on the wire every 0.12 milliseconds. If I send a one-byte message (plus tcp and ip headers) every 0.12 milliseconds, I will effectively saturate a 100-megabyte Ethernet connection with 8333 bytes of user data.

Is this the correct understanding of how tinygrams cause network congestion?

Do I have all my terminology?

+3
source share
3 answers

Ethernet " ", . , 64 1500. , (ATM ethernet , ). , 1500 ethernet.

, . 40-50 . .

, , . ( )

, , , , . , .

"tinygrams" - 10 000 , , . ( ).... 4 80 000 , 40 . "" 10- Ethernet- , 27k - :

   96 bits inter-frame gap 
+  64 bits preamble 
+ 112 bits ethernet header 
+  32 bits trailer 
-----------------------------
= 304 bits overhead per ethernet frame.
+   8 bits of data (this doesn't even include IP or TCP headers!!!)
----------------------------
= 368 bits per tinygram

10000000 bits/s รท 368 bits/packet = 27172 Packets/second.

, , ethernet, tinygrams, 216 / 10 / 2,16%

+4

TCP, , 40 . , 100 1 , 40 , 98% , , . 100- , 140 , 28% . 100 , 140 , 4000 . , 100 41 , 1 40 . 1 , , , .

, TCP, - , -, (, ), , .

+3

BDK (+1 ). , 40 . , .

, , IP. ( MTU. MTU - M, ). ). ( , 46 , 24 TCP-), , .

- . , TCP, ACK- .

As a result, you do something stupid, for example, send one TCP packet every time the user presses a key, you can easily get a huge amount of lost service data floating around.

+1
source

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


All Articles