Subject: Re: tuning IP checksumming code...
To: Chris G Demetriou <Chris_G_Demetriou@ux2.sp.cs.cmu.edu>
From: Thorsten Lockert <tholo@SigmaSoft.COM>
List: tech-net
Date: 07/17/1996 21:40:21
> (1) your longest chain is 16 mbufs?  are there really 16-mbuf chains
>     floating around out there, in regular usage?  Are they as
>     common as you'd have them seem?

Good point; they are likely not seen very often at all.

> (2) the longest "total bytes" shown was 948...  That's unrealistic,
>     given the typical size that NFS packets have when they hit the
>     wire, even more unrealistic if you think about how they get
>     passed around in the kernel and where they get checksummed.

Agreed.

I changed the benchmark to have a predominance of 1 buffer, with up
to 6 buffers at maximum.

I also modified it to predominantly using larger mbufs (up to
1500 bytes) instead of staying within MLEN.

With these changes it looks like the current OpenBSD version is
on average 10% _slower_ than the new version from Charles, and
only marginally faster than the C version (typically less than
1%).

The rationale for the original number of mbufs in a chain was likely
that "giant" mbufs were not commonly used, so that there would be
chains of up to 16 MLEN sized mbufs to hold ethernet packets.  I
did not write the original benchmark myself, tho I did extend it to
be able to test all 3 implementations easily.

Thorsten
--
Thorsten Lockert        | postmaster@sigmasoft.com | Universe, n.:
1238B Page Street       | hostmaster@sigmasoft.com |         The problem.
San Francisco, CA 94117 | tholo@sigmasoft.com      |