UDP queue depth
Kevin D. Clark
kclark at CetaceanNetworks.com
Thu Jun 19 17:23:46 EDT 2003
mod+gnhlug at std.com (Michael O'Donnell) writes:
> Given a "normal" Linux box of some recent vintage
> (like, say, 2.4.18) can anybody help me get a sense
> of how many UDP datagrams of some nominal size (like,
> say, 1k or 4k) can be received before the kernel
> (as it is entitled to do with UDP) starts dropping
> them on the floor? In other words, assuming I've
> rigged up the sender and the receiver properly but
> then had the receiver intentionally fail to read the
> incoming datagrams, how soon would the kernel start
> to discard new arrivals?
Assuming that the transmit rate isn't overwhelming the hardware, the
most important variable here is the the size of the socket's receive
buffer. You can query the size of this with getsockopt(...SO_RCVBUF)
and set this with setsockopt(...SO_RCVBUF).
Typically, you can set this buffer to a maximum of around 64k, the
default is around 8k.
When this buffer fills up, the kernel will start dropping datagrams.
Hope this helps,
--kevin
--
Kevin D. Clark / Cetacean Networks / Portsmouth, N.H. (USA)
cetaceannetworks.com!kclark (GnuPG ID: B280F24E)
alumni.unh.edu!kdc
More information about the gnhlug-discuss
mailing list