• November 15, 2020
  • Admin
  • FAQs

If your application is one that often sends very small amounts of data (a Telnet application would be a good example of this) at a time, you may experience slow performance because small packets are being coalesced into one larger packet and then sent (this is called Nagling). When two sends of less than the MTU size occur, the second send is not actually performed until an ACK is received from the remote host. This is done in anticipation of receiving more requests to send so they can be sent in one larger packet, reducing network overhead. While this may cause a delay for some very specialized applications, it is very beneficial for the majority of applications. It is possible to turn off the Nagle algorithm by using the SetSockOption method with the SSQ_TCP_NODELAY (this must be set per connection). Note that this can decrease performance in addition to causing a increase in network traffic when used improperly (for one packet, there is a 14 byte TCP header, a 20 byte IP header, and another 14 byte header for the transport media if it is ethernet, for a total of 48 bytes).

Tags: