"Stefano Pettini" <(E-Mail Removed)> wrote in message
news:333Wd.61834$(E-Mail Removed)...
> (E-Mail Removed) wrote:
>> In particular I have figures for both protocols that measure the CPU
>> usage
>> for the transmission of data at a fixed bandwidth using varying packet
>> sizes. (So these are plotted on a graph where the y axis is "CPU usage"
>> and
>> the x axis is "packet size".)
TCP doesn't preserve message boundaries but UDP does. So when you
compare them, do you force a layer on top of TCP that preserves message
boundaries? If you do, then it's not a fair comparison for protocols where
there's no need for preserving message boundaires. If you don't, then it's
not a fair comparison for protocols that need boundaries preserved.
> Which software do you use to measure the CPU usage? I need to perform
> similar tests.
I don't think you really can. TCP and UDP are designed for different
types of application. It wouldn't be fair to compare CPU usage with TCP
trying to solve the type of problem UDP was designed for or vice versa, no
would it be fair to compare their CPU usage as they tackle totally different
problems.
You would have to construct a specific case, and then ask whether TCP or
UDP consumes the least CPU usage for that particular problem. If, for
example, you require duplicate detection, lost packet detection with
retransmission, transmit pacing with exponential backoff, congestion
detection and control, and in order reception, TCP will take less CPU time
per unit of data moved. On the other hand, if you don't need duplicate
detection, transmit pacing, can tolerate out of order reception and have no
need for retransmission, UDP will win hands down.
DS