Re: Buffering Sockets

From: Nick Landsberg (SPAMhukolauTRAP_at_SPAMworldnetTRAP.att.net)
Date: 07/07/04


Date: Wed, 07 Jul 2004 11:49:43 GMT

Richard wrote:
> SPAMhukolauTRAP@SPAMworldnetTRAP.att.net wrote...
>
>
>>Based on some measurements taken many years ago on a 400 MHZ
>>processor, the overhead for TCP/IP can be approximated by
>>100 usec per packet + 100 usec per kilobyte.
>>At small buffer sizes this goes way off scale since the 100 usec
>>per packet tends to dominate. (i.e. don't send 1 byte packets!
>>It's even worse than that, but I won't go into the details.)
>>
>>I have found that this scales with processor speed, but YMMV.
>
>
> That's good data. You don't have a reference for the original
> measurements, do you -- and or, what the scaling function (curve) is
> for processor speed (logrithmic, linear, etc.) ?
>

Nope, no public reference. I did the work about 6 years
ago paritally to see what additional overhead our in-house
wrapper functions were adding. Every once in a while
I run a few ad-hoc tests when I switch projects and the
results appear to scale linearly with CPU speed. But,
I've never actually repeated that first controlled experiment.

Also note that these numbers are dwarfed by the
overhead of setting up the socket connection in
the first place. Ever since that experiment,
I try to set up all connections at startup and
keep them open as long as possible to avoid
that overhead (which was about 15 milliseconds
back then).

-- 
"It is impossible to make anything foolproof
because fools are so ingenious"
  - A. Bloch


Relevant Pages

  • Re: Why programs cant be assembled like Legos
    ... components like Legos is reinvented every generation. ... Such small scale building blocks are ... quite standard and have only a few and basic connections. ... If this overhead ...
    (comp.programming)
  • Re: B&H expansion
    ... Their overhead could affect their ability to discount prices. ... It is a large expansion. ... There were also employees there to answer ... There are always benefits to be gained with the economics of scale, ...
    (rec.photo.digital)
  • Re: Why programs cant be assembled like Legos
    ... Such small scale building blocks are ... quite standard and have only a few and basic connections. ... If this overhead ...
    (comp.programming)
  • Re: Why programs cant be assembled like Legos
    ... components like Legos is reinvented every generation. ... Such small scale building blocks are ... quite standard and have only a few and basic connections. ... If this overhead ...
    (comp.programming)
  • Operator Performance
    ... Still been beating on my Multi Unit Scalar structure and...it's coming ... overhead itself is taking magnitudes more time than the actual ... double scale; ... if (Power> 0) ...
    (microsoft.public.dotnet.languages.csharp)