"Also, the Linux kernel doesn't always enable delayed ACKs -- to reproduce this I actually had to write a Python program that explicitly turns them on. I haven't been able to find a clear explanation of exactly when delayed ACKs are used."<p>Delayed ACKs can be enabled on Linux kernels 3.11+ with ip(8).<p><pre><code> ip route change ROUTE quickack 1
</code></pre>
On MacOS and Windows, delayed ACKs can be configured through sysctl and the registry, respectively.<p>Delayed ACKs may be used in response to congestion.<p>For example, in bulk, i.e., non-interactive, transfers with large packets, delayed ACKs can be useful.<p>This is covered in Chapters 15 (15.3) and 16 of Stevens' TCP/IP Illustrated Vol. 1.<p>This draft suggests delayed ACKs are useful during TLS handshake.<p><a href="https://tools.ietf.org/id/draft-stenberg-httpbis-tcp-03.html" rel="nofollow">https://tools.ietf.org/id/draft-stenberg-httpbis-tcp-03.html</a><p>Also, socat allows for setting TCP options via setsockopt. No need to write a new program.