For OpenBSD, a configuration has been implemented that includes the TCP_NODELAY mode for the entire system.

Job Snijders, a prominent OpenBSD developer and head of one of the committees in the IETF (Internet Engineering Task Force), author of 11 RFCs related to routing and RPKI, and creator of IRRd (Internet Routing Registry Daemon), has published a set of patches for OpenBSD that add a new sysctl parameter 'net.inet.tcp.nodelay' to disable Nagle's algorithm at the system level. This parameter relieves application developers from having to set the TCP_NODELAY flag for individual sockets.

Nagle's algorithm is used to aggregate small messages to reduce traffic. The algorithm suspends the sending of new TCP segments until an acknowledgment of previously sent data is received or a timeout occurs. For example, without aggregation when sending 1 byte, an additional 40 bytes are sent with TCP and IP headers of the packet, whereas with Nagle's algorithm, messages sent before receiving confirmation from the remote side are accumulated and sent in a single packet. Due to the 'delayed ACK' optimization, which delays the sending of ACK packets, the signaling through acknowledgment packets does not work in practice, and the sending of accumulated messages occurs when a timeout is reached.

Snijders believes that in modern conditions, Nagle's algorithm, developed at a time when several users competed for a 1200 baud bandwidth, is outdated and in high-speed networks does more harm than good. Recently, a similar position was also expressed by Marc Brooker from Amazon Web Services (AWS). Arguments in favor of disabling Nagle's algorithm by default can be found in a note published a few days ago.

To disable Nagle's algorithm, the TCP_NODELAY option is provided, which can be set for individual network sockets. The TCP_NODELAY mode has long been set in many OpenBSD applications, including openssh, httpd, iscsid, relayd, bgpd, and unwind, and according to Snijders, it is time to provide the option to enable it for all TCP sockets at the system level. Snijders also suggests discussing the issue of enabling TCP_NODELAY by default and moving Nagle's algorithm to a separate toggleable option.

Kilde: opennet.ru

Køb pålidelig webhosting med DDoS-beskyttelse, VPS VDS-servere 🔥 Køb pålidelig webhosting med DDoS-beskyttelse, VPS VDS-servere | ProHoster