How to control UDP buffers in Windows XP

I am trying to optimize communications in a large UDP based system. By optimizing, I want to minimize packet loss. (Yes, I know the inherent limitations of UDP, I do not propose a different protocol) We have several .exe files with multiple threads and use

setsockopt with SO_SNDBUF  & SO_RCVBUF to increase to bufers. 

We are faced with the fact that setting a very large buffer for many sockets reduces overall performance (more packet loss) But how to control the effect of these increased buffer sizes ?, Especially on the receiving side, I would like to see if any ports receive messages that are discarded due to lack of buffer.

Please suggest how this can be done (Windbg in user or kernel mode, special programs, something homemade)

EDIT: @EdChum: I already used WireShark, and yes, it hurts to correlate packets on the wire with packets received by the application. And I saw several cases where a packet is on a wire (captured by Wireshark) but not received by the application. Those lost packets are usually a small packet for multicast assignment, which is sent with a very short time after a large unicast packet. The unicast receiver loses multicast, but the other receives it.

My suspicion is that XP sometimes suffers from some hungry memory somewhere in NDIS or IP layers and therefore silently drops packets. If there is a counter, I can confirm this.

+3
source share
1 answer

, WinDbg, NetMon WireShark, , - , , , , , , .

, loopback, .

+1

All Articles