In order to measure the system throughput performance ( 1 - idle time/
total time), which tool is the best to use?
We have WorkBench 2.4 Vxworks 6.2 with System Viewer (formally named
WindView) and ProfileScope tool. We use the system Viewer to see the
context switch over a period of time that a 1024kb buffer can hold. We
roughly look at the total number of idle ticks, it has only 20% of the
total ticks of that period of time, but in contrast, we use
profilescope tool to see the cpu usage, the idle task for cumulative %
is 98.9%!! Which one should I trust?? 98.9% doesn't look right at all
because our application is huge with 6MB VXE excutable file. But the
System Viewer also only shows the Event it counts. Other hidden calls
or operations may not be counted as an Event though..
Our system is running at 100Hz with a POSIX timer (we did not choose
Aux clock because the Vxworks BSP doesn't support Aux clock for our
MVME5101 with cpu clock speed 400MHz). however the ProfileScope can be
run at the Aux clock mode!!!! why!!? because profilescope tool provides
its own function to use the aux clock of the board??
Spylib will give the same cpu usage as the profilescope as I read from
the profilescope manual. the only difference of profilescope and spyLib
is Spylib requires Aux clock where profilescope can also run at system
clock.
We did a test using System Viewer to see how the change of Sys_Clk_Rate
affect our 100 Hz system performance. We found out that by varying the
SYS_CLK_RATE in the range of 100 ticks per second to 1000 ticks per
second, the system throughput gradually lower from 80% to 65% and
saturated at 65%. WHY??? The board CPU is fixed at 400MHz clock
speed, the SYS_CLK_RATE only affects how frequent the interrupts be
given out. It doesn't mean the CPU slow down by the SYS_CLK_RATE. Why
the Idle time grow more and more as the increase of SYS_CLK_RATE?
Thanks
Ray
You've asked some excellent questions. Fortunately, they've all mostly
been answered on this group. Do a search on "spy task" and look for
the Fred Roeber/Stan Schneider thread. Spy and WindView really operate
quite differnetly, and the clock frequency (the aux clock that spy
users directly), make a big difference on how it samples your app and
gathers the data.
When you say you systems runs at 100Hz - it that how your tick timer is
set or is that how fast you app cycles?
Good luck,
Larry
I will read more on "spy task". our system runs at 100Hz, meaning the
timer is set to give out a semaphore at 0.01 second for the application
to run. so the actual application runs at every 0.01 second as
well......
The ProfileScope works for our case then. I read the thread and Stan's
paper. I think Wind River bought their scopeprofile and now the tool
name is ProfileScope. The ProfileScope manual shows exactly the same as
his paper. I did follow every thing that should be cautious. Our
system is running at 100Hz base rate, 10Hz subrate1 and 1Hz subrate2.
Since Wind River BSP doesn't support Auxiliary clock on our board
MVME5101, we use timer_create timer_connect timer_settime to control
the 100Hz baserate. all other subrates are controlled by using counters
that we implemented not using any other timer. We set the ProfileScope
to run at 116Hz sampling rate with Aux clock (the aux clock work on
this profilescope though) . here is the status of the profilescope:
There have been 86114 total samples analyzed.
There are 30 unresolved samples in the buffer.
The sampling rate is 116 Hz.
The sampling is being done by the Aux clock.
The analysis rate is once per 2.5 seconds.
The maximum stack depth encountered is 11.
The digital filter pole for routine statistics is 0.95.
The digital filter pole for process statistics is 0.8.
There have been 1487 samples with truncated callstacks.
There have been 0 samples skipped due to full buffers.
There have been 0 samples with stack depth deeper than the maximum
level of 64.
There have been 0 interrupts missed.
What we saw on the final cpu usage is the Idle Task has 96.31% CPU
usage. i mean is this result reasonable? 96.31% CPU is doing nothing??
We ran our application in a period of 600 seconds. so 96.31% of the
600 seconds, the cpu is doing nothing!!?? isnt' it a waste of cpu?
Sounds like your CPU is not heavily loaded. Hit it with a lot of
network traffic and you'll see tNetJob take up a lot of cycles.
I normally don't use the Posix timer calls, but they are just wrappers
around wdLib, and I think they work OK. Like wdLib, the Posix timers
will run off the interrupt for your system tick timer, so you can't
specify any interval shorter than 1 tick. I don't know what your tick
rate is set to - 100/second (10ms)?
Good luck,
lc