Wireshark-users: Re: [Wireshark-users] windows 10 / udp packet loss, off-topic ?

From: Jeff Morriss <jeff.morriss.ws@xxxxxxxxx>
Date: Mon, 18 Jul 2016 15:52:58 -0400


On Mon, Jul 18, 2016 at 9:50 AM, Frédéric LOCHON <f.lochon@xxxxxxxx> wrote:
Hello,

I'm facing a strange behavior on Windows 10 computers.
That's a little bit off-topic, but I give it a try.

Since I upgraded to Windows 10, I get some packet loss from Windows:
- I get an UDP packet every 10 ms or so coming from some equipment I have on my network.
- I do see every packet in Wireshark (which means the link is OK).
- I don't see every packet in "Windows" (using winsock API), I loose about 1 to 5 packets every second (not very regularly).

I know UDP has no guarantee about packet delivery, and I can manage some losses.
However, losing few packets every seconds is too much for me.

If Wireshark sees the packets that your application does not then it really sounds to me like your application's socket buffer is overflowing.

I'm not sure if there are tools in Windows (like netstat) to count such things or not but a quick test would be to increase the socket buffer size (setsockopt()).

Even if the load is low if your application isn't scheduled quickly enough to pull the packets off the socket then you could still get buffer overflows.  (If the packets come at very regular intervals you could also measure this by getting accurate time stamps of when your application receives the packets; if there's a large variation from that interval then you may have a scheduling problem.)