Re: Melting the Internet?

Sean Foderaro (jkf@frisky.Franz.COM)
Thu, 04 May 95 10:24:56 -0700

>> "Using UDP" doesn't necessisarily mean "being unfriendly."

Agreed. UDP can be used in a way that doesn't harm the net, but
it can also be used a way that does. TCP has built in safeguards so
it is much harder to harm the net. UDP is like an electrical circuit
without a fuse.

>> The "reliable connection" and "ordering" semantics of TCP make it
>> entirely inappropriate for packet video. You cannot drop packets --
>> your data stream is locked into end-to-end reliable delivery, at the
>> expense of timely arrival.

I'll be sure to check out that paper.

Let me describe an experiment I just finished.

Machine A ------------- Machine B ------------ Machine C
10mbps 115kbps
(V.34 modem w/V.42bis compression)

Machine A sends 10,000 128 byte packets to Machine C using TCP
and then UDP. We measure how long the sending takes on Machine A
and the receiving takes on Machine C. For the UDP case we measure
packet loss. Machine A tries to send as fast as possible but
we don't use non-blocking I/O so the operating system will block
the writing process if it has to. All times are wall-clock times.

TCP case:
Machine A: 113 seconds to send
Machine C: 113 seconds to receive

UDP case:
Machine A: 8 seconds to send
Machine B: 125 seconds to receive.

The last 6 packets were dropped.

Now let's consider what this means for real-time performance.
For the TCP case Machine C saw each packet very soon after Machine A
sent it. For the UDP case this isn't true. In fact Machine C
saw the last packet two minutes after Machine A sent it.

I would say that in this case, TCP gives far better real-time performance
than UDP.

Had Machine A been using non-blocking I/O for sending, then it
could have done useful work during most of the 113 seconds of the
transfer (i.e. in the video conferencing case it could have
used select() to determine when it was possible to again write to the socket
and then taken a current video snapshop and written that to machine C.)

I realize that this is an extreme case of bandwidth mismatch.
I'll be experimenting with various other network configurations.