[comp.protocols.tcp-ip] CRC calculation costs

randy@LARRY.CS.WASHINGTON.EDU (Randy) (03/31/88)

Drew:

I'm interested by your statements that checksuming is a very small part of
the procotcol processing. "Common wisdom" I've always heard, and 
Cabrera et.al. in "User-Process Communication Performance in Networks of
Computers" (IEEE Trans. on Software Eng. Jan. 88) say that data copying and
checksumming are the two biggest components of protocol processing in
BSD4.2 Unix implementations.

Have you done any instrumentation of your code to get performance statistics
of which parts of the protocol processing account for the bottlenecks?

Randy Day.
Internet (ARPA): randy@cs.washington.edu
CSNET: randy%washington@relay.cs.net
UUCP: {decvax|ihnp4}!uw-beaver!uw-june!randy

ddp+@ANDREW.CMU.EDU (Drew Daniel Perkins) (04/05/88)

> *Excerpts from: 30-Mar-88 Re: CRC calculation costs (..*
> *Randy@larry.cs.washingto (680)*

> I'm interested by your statements that checksuming is a very small part of
> the procotcol processing.
That is not what I said.  What I said was that the cost was "low" when using an
incremental table driven CRC computation at asyncronous line speeds (9600 baud).

Drew

riedl@cs.purdue.EDU (John T Riedl) (04/06/88)

Tom Mueller and I did some experiments [1] on measuring the costs of
various components of UDP on Suns (3/50s), using *very small packets*.
We measured UDP round-trips of 7.2ms, with checksuming being 0.12ms of
that, and mbuf manipulation about 0.5ms.  1.6ms was spent in the
socket layering (just the socket abstraction code), 0.5ms in the
context switch on receive, and 0.4ms in copying from kernel to user
space.  Note that these are the cheap 1s-complement bitsums that have
been under discussion recently and that only the headers are being
checksumed.

Our data compare well with Watson and Mamrak's work on VMS [2].  They
report on transmitting 1024 byte packets.  The total transmission time
(one-way) was 4.2ms, of which 0.5 ms was data checksuming vs. 0.8ms
for the context switch and system call overhead.  So at least in some
environments, checksuming is relatively cheap.

[1] Bharat Bhargava, Tom Mueller, and John Riedl, "Experimental
Analysis of Layered Ethernet Software".  In Proceedings of the
ACM-IEEE Computer Society 1987 Fall Joint Computer Conference.

[2] Richard Watson and Sandy Mamrak, "Gaining Efficiency in Transport
Services by Appropriate Design and Implementation Choices".  ACM
Transactions on Computer Systems, May 1987.
-- 
John Riedl
{ucbvax,decvax,hplabs}!purdue!riedl  -or-  riedl@mordred.cs.purdue.edu