Re: CPU load due to IP networking

From: Bill Davidsen (davidsen_at_tmr.com)
Date: 06/22/05


Date: Wed, 22 Jun 2005 02:32:16 GMT

jbl wrote:
> I've been looking for some information on the web, in white papers and
> even on Usenet, but if it exists I can't seem to put together a search
> that finds it. I'm asking here if anyone knows of something along
> these lines and can point me to it.
>
> I'm looking for some data on the approximate resource cost,
> particularly CPU usage cost, of doing networking in a typical system,
> in particular a Unix-like system (linux is a suitable example) and
> vxworks (hence the crossposting).
>
> I'm not looking for bandwidth / capacity type data (e.g., N kpkts/sec
> or M MB/sec); these measures are fairly common and there are lots of
> examples on the web. Rather I'm looking for an approximate cycle or
> instruction count list, like this: I'd like to know that the CPU will
> expend A instructions (or cycles) per IP packet in, B cycles per IP
> packet out, C cycles per TCP packet in, D cycles per TCP packet out,
> etc.; and T cycles per connection per second, and U cycles per second
> for background processing, etc. Then using these numbers loosely as
> rules of thumb, and given a traffic model and a CPU of a certain type
> and speed, I could compute a rough estimate of what portion of the CPU
> capacity would be consumed by networking activities. I'd also like to
> include not only TCP/IP but UDP and some other router-like protocols
> (e.g. BGP or OSPF routing) and layer 2 activity (such as implied by
> ethernet connections.

I think you will find that load vs. packets or load vs. bytes is
non-linear to the point that you are not going to get a reasonable
prediction or even a number you are likely to be able to repeat.
>
> I hope it's clear enough what kind of data I'm looking for, and that I
> only need rough numbers. If anyone knows of something of this sort
> that's been published, for any operating system, actually, I'd
> appreciate a pointer.

It's clear that you have an interesting time looking up details on doing
kernel profiling. Once you can do that you can apply any synthetic load
you think will be useful, and report your findings. Develop your
equations to include all of the tunables in a modern kernel, since they
all affect the performance.

-- 
bill davidsen <davidsen@tmr.com>
   CTO TMR Associates, Inc
   Doing interesting things with small computers since 1979


Relevant Pages

  • Re: Atmel releasing FLASH AVR32 ?
    ... A dual thread 40 MHz CPU can replace two 20 MHz CPUs. ... that a thread can only run max 1/2 or 1/3rd of the cycles ... switch at the start of the pipeline, ... equivalent to the interrupt latency. ...
    (comp.arch.embedded)
  • Re: Apple II Disk Drive Question
    ... derived from the Apple II CPU clock which runs at ... which will write one bit every four CPU cycles, ... adjusting the speed of the two drives to create the necessary ... know the rotation speed of both the writing and reading drives, ...
    (comp.sys.apple2)
  • Re: Adjusting PC Hyperthreading for Spice Simulation
    ... 3 instructions (or 3 cycles' worth of instructions) per CPU ... PPro upwards can execute multiple load/store ... 1100 MHz to 1400 MHz CPU cores had appeared we had DDR 333 ram. ...
    (sci.electronics.design)
  • Re: Apple II Disk Drive Question
    ... which will write one bit every four CPU cycles, ... disk is spinning. ... adjusting the speed of the two drives to create the necessary ...
    (comp.sys.apple2)
  • Re: global rq->clock
    ... Andi said he was working on a fastish global sched_clock ... On some systems it counts cycles, ... I'm not convinced TSC is the right thing for the scheduler in the first ... (software CPU frequency control is only part of that; ...
    (Linux-Kernel)