0

I have a network application running on Windows Server 2008 R2, that must send small packets in a very short time interval, each microsecond matters. My problem is that windows accumulates the packets and sends them in a big TCP packet, but I want each packet to be sent separately.

I disabled interrupt moderation in the nic. I also set the MTU size of the interface to 63 (that's smallest the size my packet fits in). I inspect the traffic with Microsoft's Netmon and most of the time this setting seems to be ignored and Windows keeps accumulating the packets before sending them. What am I doing wrong? Is there any other way to force windows to send small packets as soon as the packets arrive the interface? As far as I know Windows is using Nagle to combine data, but I couldn't disable it using the registry. I can't change the platform.

Yekoor
  • 31
  • 1
  • 4

1 Answers1

2

If you have any control over the application itself, setting the socket option TCP_NODELAY when creating the socket will have the effect you're looking for. This informs the socket to disable Nagel for that connection. This is probably the most reliable method.

It sounds like you've already discovered the TcpAckFrequency registry trick; but if you haven't, it may provide some relief if you can't get the application-code adjusted. For that:

  1. Find your interface under HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\Tcpip\Parameters\Interfaces
  2. Create a new 32-bit DWORD value named TcpAckFrequency and set it to 1.

There used to be a key called TcpNoDelay there, but it seems to have been removed for Win 2008.

sysadmin1138
  • 131,083
  • 18
  • 173
  • 296
  • I can't modify the appllication. Setting TcpAckFrequency didn't really help. I can still see that TPC packes with size of up to 4500 are being sent. I have 2 other servers, they seem to work better. Maybe it depends on the NIC and its settings. – Yekoor Dec 01 '15 at 17:38