Subject: Re: Slow UDP traffic
To: Schamil Wackenhut <>
From: Johnny Billquist <>
List: netbsd-users
Date: 06/07/2004 14:17:18
On Sun, 6 Jun 2004, Schamil Wackenhut wrote:

> * Johnny Billquist wrote:
> > But it's difficult to just compare TCP and UDP. It would be easier to
> > understand if the original poster would tell *how* he measured the
> > bandwidth with TCP and UDP. Did he write his own test program, or did he
> > use something already existing. If so, what program, and what does that
> > program do.
> >
> > If he's doing something silly like transferring files, using ftp and tftp,
> > then I wouldn't be surprised by these numbers at all.
> >
> > So: what is he really doing?
> Uhmm, i don't want to be rude, but what didn't you understand in this
> sentence:
> "PS: i used ttcp for benchmarking, with normal parameters (ttcp -{r,t}
> -s -u [host])"

Sorry, but I had missed that one. Either I'm getting blind, or it slipped
my mind. I didn't comment from the start because I didn't want to get
involved if someone else had a good answer straight up.

Looking at ttcp, there are some issues that can (and should) be taken into

1. When using ttcp with UDP, it will send two extra packets to mark the
start and end of the test.
2. Using the default buffer size of 8192 bytes is rather suboptimal. This
will require fragmentation in IP, along with one packet in six being
rather short.

In regards to item 2 I've seen one or two odd ethernet cards which really
don't deal very well with several packets sent at the same time (more or
less), which is what happens when you send a packets that IP fragments.
That can result in really poor performance. For NFS that can relly make a
difference, and is one of those cases when you want the NFS transmit size
to be rather short.

That's just a few points, however. Exactly why you see such poor
performance with UDP can be other reasons as well. No easy way to tell,
but if things are in proper order, you should get higher performance with
UDP (but with the added risk of dropped packets and so on).


Johnny Billquist                  || "I'm on a bus
                                  ||  on a psychedelic trip
email:           ||  Reading murder books
pdp is alive!                     ||  tryin' to stay hip" - B. Idol