Alen Peacock wrote:
On 1/27/07, David Barrett <[EMAIL PROTECTED]> wrote:

Is it actually any cheaper to send a 0-byte UDP packet than to send one that
is sized at the MTU?

In terms of CPU and bus burnage, small UDP packets are going to be
WAAAAAY more expensive than sending/receiving large UDP packets.  It
isn't too hard to confirm this through simple experiments.

Agreed, but this is the answer to a different question. I think that David (who may correct me if I'm wrong), wants to know "if I'm sending packets regularly, is there any advantage to making sure it is as small as possible, or is there no real difference if I just fill it all the way up?" vs. the other equally good question that you've answered which is "if I need to move X megabytes of data over the net, is there an advantage to using the entire MTU for each in order to minimize the number of packets sent?".

The answer to the first is "yes, there's some advantage to trying to keep the size of your packets down by sending data efficiently, but this advangtage depends on the link technology your packets run over... for some, like ethernet LANs, there's a lot of per-packet overhead that dominates, for others like a PPP modem connection, every byte counts"

The answer to the second is "absolutely, given that some links have large per-packet overhead and most routers and hosts have large fixed overheads of CPU time for each packet that arrives, you should use as much of the MTU as you can for each packet you send... while making sure that A) you don't fragment and B) you know what head-of-line blocking is, and how it matters to your application (if at all)"

Matthew Kaufman
[EMAIL PROTECTED]
_______________________________________________
p2p-hackers mailing list
[email protected]
http://lists.zooko.com/mailman/listinfo/p2p-hackers

Reply via email to