Why are UDP Datagrams Being Dropped Under Load?

Article ID: 39334689

Question

Why are UDP Datagrams Being Dropped Under Load?

Facts

Windows CE devices UDP packets addressed to a terminal are transferred to the terminal (as observed by an RF trace) but are not available for applications on the terminal. Windows CE internally maintains a per socket queue of User Datagram Protocol (UDP) datagrams that haven't yet been processed by applications. Once this queue fills up, packets are discarded (beginning with the oldest ones first). The result is that applications that send a large number of UDP datagrams quickly can experience large amounts of packet loss.

Answer

The default internal UDP buffer queue size is 2.  If a platform must support applications that potentially deliver more than 2 datagrams in a very short time (the time needed to process a packet, which is highly dependent on network and platform characteristics), the default limit can be raised.

Change the registry value which determines the number of UPD packets held to allow a larger queue size.
Create a reg file containing the below key set to the value required.  The value necessary would depend on the specific application, but a practical range might be 2 to 10 hex.
[HKEY_LOCAL_MACHINE\Comm\Afd]
DgramBuffer=dword:8