On Tue, Nov 16, 1999 at 01:08:33AM -0500, Aleksandar Bakic wrote:
> 
> I thought about this, but a friend, who has more experience with
> the network configurations at my university, said that he had had too
> many dropped packets when using UDP (around 90%). And I don't need
> quick one-time connections, but just the opposite (periodic sending of
> data, 225kBps on average).


The main reason UDP drops packets is because there's no built-in rate
limitation; you have to do it yourself.  If you send packets 10 times
faster than the slowest link can handle, it will drop about 90% of
the packets.  The slowest link could be the recieving program -- if
your program reads in one packet, then processes it, then reads another,
that could easily be enough time to overrun the kernel UDP buffer for
that socket.  When that happens, the kernel starts ignoring packets for
that socket.

Designed properly, processes communicating via UDP over ethernet can
reach a packet loss rate that is equivalent to the hardware limit
of ethernet, assuming there are no cabling problems.  

A good book on this subject is W. Richard Stevens, "UNIX Network
Programming, Vol. 1: Networking APIs - Sockets and XTI", which goes
into great detail about whether UDP or TCP is appropriate for a
particular application.




dave...


--- [rtl] ---
To unsubscribe:
echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR
echo "unsubscribe rtl <Your_email>" | mail [EMAIL PROTECTED]
----
For more information on Real-Time Linux see:
http://www.rtlinux.org/~rtlinux/

Reply via email to