Wednesday, August 26, 2015

Re: [Discuss-gnuradio] performnace monitor runtime usage to the whole system

Hi Jeon,
But I don't think that GNU Radio uses 100 percent (= one) of CPU capability.
Well, that obviously depends on what you do with GNU Radio.
Generally, GNU Radio scales pretty well, so I'm going to reply with:
GNU Radio tries to consume as much CPU as possible. There's limiting factors, mainly RAM access and IO that limit how much CPU can get consumed.

As you seem to be running a receiver: There's the upper limit on how much CPU can get used of samples coming in. You can only process as much signal as there is. Also, things that are out of the scope of the GNU Radio process tend to play an important rule here: The kernel has to talk to your radio hardware, etc.

I'm not quite sure what you refer to with "one"; do you mean the 1 that tools like "top" would display (namely: one fully occupied CPU core according to a more or less useful statistic; single processes can in that metric actually have CPU loads > 1)?

In order to calculate runtime usage of each block, therefore, it can be done by multiplying usage of GNU Radio process.
No. GNU Radio is a heavily multi-threaded architecture, so each block runs in its own thread. Assuming you have a multi-core CPU, multiple threads will run at once; one core of your CPU might be 100% occupied by the GNU Radio block thread(s) running on it, whereas another is only 80% busy etc. This does not allow direct mapping of "percentage of CPU load" to actual time.

However, the performance counters offer exactly what you seem to need: The percentages your looking at are computed from the microseconds that each block spends in its work function. So just look at these total times.

I think it would be interesting to hear what you want to do, maybe we have an idea how to measure what is of interest to you.

Best regards,
Marcus



On 26.08.2015 18:59, Jeon wrote:
I've learned that sum of runtime usage values of all blocks should be and is one.

But I don't think that GNU Radio uses 100 percent (= one) of CPU capability.

And I think that 'one' is a portion to the capability which is allowed and allocated to the GNU Radio.

In order to calculate runtime usage of each block, therefore, it can be done by multiplying usage of GNU Radio process.

That is, if python running the flow graph is occupying 10 percent capability of CPU and a demodulator block is indicating 20 percent in performance monitor, actual runtime usage of the block would be 0.1 * 0.2 = 2 percent of CPU.

(How to know usage of python? Maybe, `top` command in POSIX)

Is what I think is correct?

Regards,
Jeon.


_______________________________________________  Discuss-gnuradio mailing list  Discuss-gnuradio@gnu.org  https://lists.gnu.org/mailman/listinfo/discuss-gnuradio  

No comments:

Post a Comment