[netperf-talk] Re: CPU calibration
Rick Jones
rick.jones2 at hp.com
Mon Jul 9 14:53:48 PDT 2007
Brijraj Vaghani wrote:
> Hi all,
>
> I am trying to measure the CPU utilization of the IP/UDP stack on an
> embedded Linux environment. To measure the CPU utilization, I cross
> compiled Netperf for this particulate Linux environment and then
> executed it. The CPU utilization measurements returned U as Netperf
> was not aware of the Number of processors and CPU rate on the
> processor.
Ostensibly, "linux is linux" (well... :) and the /proc/stat stuff should
work. IIRC that would be --enable-cpuutil=procstat.
> Then as recommend in the manual ("some platforms have no particularly
> good mechanisms. On those platforms, it is probably best to use the
> "LOOPER" mechanism") I configured Netperf to use the LOOPER method to
> determine CPU utilization and executed it.
> The following is the result which I got for command line command
> netperf -H 10.195.16.226 -t UDP_STREAM -w 100 -b 8 -C -- -m 256
So, I see you then also did --enable-intervals right?
> Socket Message Elapsed Messages CPU
> Service
> Size Size Time Okay Errors Throughput Util
> Demand
> bytes bytes secs # # 10^6bits/sec %
> UL us/KB
>
> 110592 256 30.63 4800 0 0.3 -1.00 -1.000
> 104448 30.63 4189 0.3 3.30
> 965.666
>
> The CPU utilization of 3.3% seems to be a little high of 0.3 Mbps of data.
> The manual also mentions that CPU calibration is needed when the
> LOOPER technique is used. As seen from my the command line, I did not
> specify the CPU rate. The debug trace on the machine running Netserver
> says "local maxrate = 316603 per sec". How do I validate this value of
> 316603??.
I suspect that while you asked for a 30 second run, the overall time was
more like 70 seconds - that time was the netserver running the cpu util
calibration code. Actually, for the looper stuff it may even be a bit
longer since it waits a bit for the looper process(es) to settle-in.
You could also run:
netperf -H <remote> -t REM_CPU
and it should give you its calibration value. For a looper test all
that really is is how quickly the looper process sits and spins in its
little loop. See src/netcpu_looper.c for details.
> The Linux environment on which I am running Netserver has 1 processor
> running at 624 MHz. Is there a way to calculate CPU rate of a
> particular processor, if yes then how? Also any other ideas on why the
> CPU utilization looks high?
Well, you could run top or vmstat - without netperf measuring CPU since
the looper will take the system CPU util to 100% - and compare with what
netperf reports for CPU util.
The 3.3% CPU util for 0.3 megabits per second could indeed be an
artifact of the looper - there will be additional process/process
context switching with the looper CPU util method. Or it could just be
high CPU utilization thanks to path length in the stack.
happy benchmarking,
rick jones
>
> Looking forward to your response.
>
> Thanks,
> Brijraj
More information about the netperf-talk
mailing list