I have performed the testing. I sent segments with size of 32 bytes in a loop. NuttX source code is based on SHA-1 = 1e2560267898f413c93c5fb616ddc5b1d4d07184. As a TCP host I used Linux kernel 4.19.
In case of forcing TCP_QUICKACK option to 1 in Linux I added the following line after recv(): recv(fd, in_buffer, MAX_BUFFER_SIZE, 0); setsockopt(fd, IPPROTO_TCP, TCP_QUICKACK, (int[]){1}, sizeof(int)); Forcing TCP_QUICKACK option to 1 in Linux means forced disabling delayed ACKs. In case of forcing TCP_QUICKACK option to 0 in Linux I added the following line after recv(): recv(fd, in_buffer, MAX_BUFFER_SIZE, 0); setsockopt(fd, IPPROTO_TCP, TCP_QUICKACK, (int[]){0}, sizeof(int)); Forcing TCP_QUICKACK option to 0 in Linux means forced enabling delayed ACKs. If TCP_QUICKACK option is not set (not forced to any value) after each recv() call, Linux kernel implements its adaptive algorithm on-the- flight. The results are as follows: - Exp.1 (CONFIG_NET_TCP_SPLIT is disabled in NuttX, Linux socket using default settings): ACKs come immediately, no issues. - Exp.2 (CONFIG_NET_TCP_SPLIT is disabled in NuttX, forcing TCP_QUICKACK option to 1 in Linux socket): ACKs come immediately, no issues. - Exp.3 (CONFIG_NET_TCP_SPLIT is disabled in NuttX, forcing TCP_QUICKACK option to 0 in Linux socket): ACKs are delayed by 40 ms, performance issues. - Exp.4 (CONFIG_NET_TCP_SPLIT is enabled in NuttX with default NET_TCP_SPLIT_SIZE [=40], Linux socket using default settings): ACKs come immediately, no issues, packet split does not occur. - Exp.5 (CONFIG_NET_TCP_SPLIT is enabled in NuttX with default NET_TCP_SPLIT_SIZE [=40], forcing TCP_QUICKACK option to 1 in Linux socket): ACKs come immediately, no issues, packet split does not occur. - Exp.6 (CONFIG_NET_TCP_SPLIT is enabled in NuttX with default NET_TCP_SPLIT_SIZE [=40], forcing TCP_QUICKACK option to 0 in Linux socket): ACKs are delayed by 40 ms, performance issues, packet split does not occur. - Exp.7 (CONFIG_NET_TCP_SPLIT is enabled in NuttX with NET_TCP_SPLIT_SIZE = 20, Linux socket using default settings): ACKs come immediately, no issues, packets are splitted. - Exp.8 (CONFIG_NET_TCP_SPLIT is enabled in NuttX with NET_TCP_SPLIT_SIZE = 20, forcing TCP_QUICKACK option to 1 in Linux socket): ACKs come immediately, no issues, packets are splitted. - Exp.9 (CONFIG_NET_TCP_SPLIT is enabled in NuttX with NET_TCP_SPLIT_SIZE = 20, forcing TCP_QUICKACK option to 0 in Linux socket): ACKs come immediately, no issues, packets are splitted. Thus if Linux socket (Kernel 4.19) is used with default settings or if TCP_QUICKACK socket option is forced to 1, it does not matter if CONFIG_NET_TCP_SPLIT is enabled or not. There are not performance issues. However, if TCP_QUICKACK socket option is forced to 0 in Linux, there are performance issues in NuttX TCP sender unless CONFIG_NET_TCP_SPLIT option in NuttX is enabled. On Fri, 2021-10-15 at 07:54 -0600, Gregory Nutt wrote: > I think we should be testing with smaller, more typical user buffer > sizes to verify the performance when the split is disabled or > removed.