Content deleted Content added
Artoria2e5 (talk | contribs) m →Large-write case: receiving end |
Artoria2e5 (talk | contribs) →Disabling either Nagle or delayed ACK: net.inet.tcp.delayed_ack, but freebsd only. maybe someone can get a sysctl on Linux someday. |
||
Line 38:
=== Disabling either Nagle or delayed ACK ===
TCP implementations usually provide applications with an interface to disable the Nagle algorithm. This is typically called the <code>TCP_NODELAY</code> option. On Microsoft Windows the <code>TcpNoDelay</code> registry switch decides the default. <code>TCP_NODELAY</code> is present since the TCP/IP stack in 4.2BSD of 1983, a stack with many descendants.<ref name=fbsd>{{man|4|tcp|FreeBSD}}</ref>
The interface for disabling delayed ACK is not consistent among systems. The {{code|TCP_QUICKACK}} flag is available on Linux since 2001 (2.4.4) and potentially on Windows, where the official interface is {{code|SIO_TCP_SET_ACK_FREQUENCY}}.<ref>{{cite web |title=sockets - C++ Disable Delayed Ack on Windows |url=https://stackoverflow.com/a/55035021 |website=Stack Overflow}}</ref>
Setting <code>TcpAckFrequency</code> to 1 in the Windows registry turns off delayed ACK by default.<ref>{{cite web |url=https://support.microsoft.com/en-us/help/328890/new-registry-entry-for-controlling-the-tcp-acknowledgment-ack-behavior |title=New registry entry for controlling the TCP Acknowledgment (ACK) behavior in Windows XP and in Windows Server 2003|date=23 February 2023 }}</ref> On FreeBSD, the [[sysctl]] entry ''net.inet.tcp.delayed_ack'' controls the default behavior.<ref name=fbsd/> No such switch is present in Linux.<ref>{{man|7|tcp|Linux}}</ref> ===Large-write case===
|