I'm developing a Real Time application on CentOS v6.2. The app has a TCP client which keeps sending small size packets (~50bytes) to a Windows 7 TCP server. The socket sendbuffer was set to minimum allowed value 2048bytes. Nagle's Algorithm is disabled by using TCP_NODELAY to send TCP packets immediately.<br />
The app works well with kernel 2.6.33.7-rt30 and 2.6.33.9-rt31. Recently I upgraded the kernel to 3.8.13-rt11, and detected a big delay (200mS) on TCP send()/write() system call. I used tcpdump to monitor the network traffic and found the TCP client is blocked for sending next packet until it receives ACK of previous packet. Since the Windows TCP server has a delayed ACK of 200ms, the TCP client send() will then be blocked 200ms for each packet.<br />
The interesting part is if I increase the send buffer to a bigger size such as 10000, the 200ms problem disappears.<br />
I'm not quite sure if the problem is caused by kernel 3.8.13-rt11 defect or CentOS system call. Just report the issue to CentOS, since I'm going to use CentOS for a long time.
↧