[Top] [All Lists]

Re: numbers...

Subject: Re: numbers...
From: "David S. Miller" <>
Date: Thu, 16 May 1996 02:21:12 -0400
In-reply-to: <> (
   Date: Wed, 15 May 1996 09:40:53 -0700
   From: (Neal Nuckolls)

   > sun4m SS10 115mhz hypersparc, 256k cache
   > measure_csum_partial
   > csum_partial: sz[1024] 10000 iterations takes 17009430 microseconds
   > csum_partial: sz[1024] 1 iteration takes <1700 microseconds>==<332 

   Maybe I'm dense this morning but I don't understand the numbers.

[NOTE: real lmbench results with the new checksum code in a bit, it's
       not as much of an improvement as I wanted and Solaris still
       gets better TCP bandwidth on localhost.]

The benchmark looks like:

        for(iter=0; iter < 10000; iter++) {
                for(inner=0; inner < 512; inner++) {
                        csum(foo, bar, baz);

The 512 number is just imperical because for small buffers (less than
1k) doing just one iteration caused it impossible to measure anything

I am factoring in the time the cache flush takes.  I calculate how
long it takes to do the flush before the loop runs, then subtract that
value multiplied by (iter * inner) from the final time.

So the 17009430 microseconds is the time it takes to run the entire
loop structure minus the flushing overhead.

1700 microseconds is the time each run of the inner for loop took
again minus the flush overhead, 332 nanoseconds is the absolute time
each instance of the csum() took to run on the buffer once again this
is after subtracting the flush overhead.

David S. Miller

<Prev in Thread] Current Thread [Next in Thread>