4.2.3.2 When to Send an ACK Segment
A host that is receiving a stream of TCP data segments can
increase efficiency in both the Internet and the hosts by
sending fewer than one ACK (acknowledgment) segment per data
segment received; this is known as a "delayed ACK" [TCP:5].
A TCP SHOULD implement a delayed ACK, but an ACK should not
be excessively delayed; in particular, the delay MUST be
less than 0.5 seconds, and in a stream of full-sized
segments there SHOULD be an ACK for at least every second
segment.
DISCUSSION:
A delayed ACK gives the application an opportunity to
update the window and perhaps to send an immediate
response. In particular, in the case of character-mode
remote login, a delayed ACK can reduce the number of
segments sent by the server by a factor of 3 (ACK,
window update, and echo character all combined in one
segment).
In addition, on some large multi-user hosts, a delayed
ACK can substantially reduce protocol processing
overhead by reducing the total number of packets to be
processed [TCP:5]. However, excessive delays on ACK's
can disturb the round-trip timing and packet "clocking"
algorithms [TCP:7].
So, bottom line, it should provide bettter TCP RX performance. I am having problems testing this properly right now (due to some problems in the little networking test bed.). If any has a good TCP test bed in place, I would love to get your feedback.
@Xiang You did some testing with iperf3. Did you learn anything interesting about network performance? If you still have the iperf3 setup, I would love to verify that it is still functional with the delayed ACKs.
The delayed ACK as to be enabled as a TCP configuration.
I just added some support for TCP delayed ACKs to the NuttX TCP stack (part of RFC 1122). Here is some description from RTC 1122:
4.2.3.2 When to Send an ACK Segment ... A TCP SHOULD implement a delayed ACK, but an ACK should not be excessively delayed; in particular, the delay MUST be less than 0.5 seconds, ...
There is a problem with meeting this requirement. The current TCP timers are in units of 0.5 sec. We cannot represent a 0.5 second delay with that resolution. And, worse, most network drivers only drive the TCP timing at intervals of around 1 sec. That might make the feature less usable.
... I am having problems testing this properly right now (due to some problems in the little networking test bed.). ...
However, I'm not at all surprised if Windows bends the rules. And I
should warn you that Linux does too. I haven't found any newer RFC (that
I can remember) that redefines this rule, but Linux can suddenly drop
down to only sending an ACK after something like 10-15 packets, even
when MSS is 1460.
And I've seen Windows sometimes do very broken things in many places...
So you might just have hit a place where they are trying to be clever,
and are breaking the RFC.
However, I'm not at all surprised if Windows bends the rules. And I
should warn you that Linux does too. I haven't found any newer RFC (that
I can remember) that redefines this rule, but Linux can suddenly drop
down to only sending an ACK after something like 10-15 packets, even
when MSS is 1460.
This also have implications for nagle. But it all depends so much on
what the usage pattern looks like...
By the way, the MTU is not negotiated, nor is it optional.
The MTU is basically just the maximum packet length accepted by the
interface.