UDP packet loss

Rick Jones rick.jones2 at hp.com
Thu Jun 8 22:01:16 UTC 2006

Scott S. Bertilson <scott at nts.umn.edu> wrote:

> You can get an idea of what the socket buffer size is
> if you can catch the system at a time when the "packet
> receive error" counter is ticking along by:
>     netstat -na --inet | grep ':53 '
> You'll likely see a TCP port 53 socket, but its Recv-Q
> is likely small or 0 unless you're receiving a very
> large number of TCP queries (a very unusual situation).
> On the other hand, you should see a fairly large number
> in a UDP port 53 Recv-Q.  If you're overflowing, that
> number will probably be very close to the UDP socket
> input queue size for that socket.

Although that will depend on the way drivers behave - the small DNS
request packet may be in a larger ~1500 byte buffer, and IIRC linux
checks against _two_ limits on the socket - the actual data count, and
the buffer limit, which until you hit the max's with your setsockopt()
will be twice the data limit - at least I think that is the case based
on what I've been seeing with netperf over the years.

rick jones
denial, anger, bargaining, depression, acceptance, rebirth...
                                     where do you want to be today?
these opinions are mine, all mine; HP might not want them anyway... :)
feel free to post, OR email to rick.jones2 in hp.com  but NOT BOTH...

More information about the bind-users mailing list