discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Discuss-gnuradio] usrp x310 full duplex: receiving flowgraph can ca


From: Nicolas Cuervo
Subject: Re: [Discuss-gnuradio] usrp x310 full duplex: receiving flowgraph can cause underflow problem at transmitter side
Date: Mon, 3 Jul 2017 14:56:41 +0200

Hello Yang,

it is true that each block will have its own thread in GNURadio, but, in any case, your resources are limited when it comes to CPU processing. What seems to be happening is that one of your paths is demanding resources and, when it gets them, leaves the other path without enough resources to perform its tasks. You will have to identify the critical paths of your signal processing and optimize them in order to have enough resources for both TX and RX to run simultaneously.

An easy first step to identify where most of the load is being done is by using tools such as "htop", where each thread (created for each block) can be listed, along with the percentage of CPU that they are using; high CPU percentage might be a call for optimization.

Assuming that you are writing your own blocks in this application. there are multiple ways to further analyze/optimize the performance of your processes. Maybe some of the functions that you are using can be optimized, or replaced with VOLK [1]. You could also turn on the performance counters [2] and use the information to profile your blocks sample-wise. In addition, using performance profiling tools such as "perf" or "valgrind" might also give you a good insight to where the most processing is being done in your application.

In addition, you can tweak your system a little in order to get more performance from your host machine. Please have a look at the system configuration page [3] of our manual and specify priority scheduling as well as setting your CPU governors to "performance" (in case you haven't done that yet). This might also boost the performance and reduce the problems that you are encountering. The rest of that configuration page [3] might come handy for further tweaking. 

Regards, 
-Nicolas

[1] https://gnuradio.org/doc/doxygen/volk_guide.html
[2] https://wiki.gnuradio.org/index.php/PerformanceCounters
[3] https://files.ettus.com/manual/page_usrp_x3x0_config.html

On Fri, Jun 23, 2017 at 8:32 PM, Yang Liu <address@hidden> wrote:
Dear all,

we are using one usrp x310 with two UBX 160 in a full duplex mode (one ubx for transmitting and the second one for receiving, with a 10G connection). In the code, two separate TX and RX flowgraphs are established (under a single process).

top_block:

        self.txpath = tx_hier(...)
        self.rxpath = rx_hier(...)
        self.source = uhd_receiver(...)  # set up usrp, subdev: A:0
        self.sink = uhd_transmitter(...)  # set up usrp, subdev B:0
        self.connect(self.source, self.rxpath)
        self.connect(self.txpath, self.sink)

 However, in the actual test, we found that once RX flowgraph is busy at processing data, the transmitter will suffer from severe underflow problem while sending packets. Sample rate is just 5Msps, using TX flowgraph alone will not have underflow and RX flowgraph alone no overflow either under the same sample rate. 

Since these two flowgraphs are separate, and that gnuradio will assign one thread to one block, it seems to me that processing data should not have impact at transmitting (independent). I am wondering how could this happen. I tried to use gr::hier_blocks::set_processor_affinity to separate core resources also, but it didn't work. Maybe blocks at transmitter can't get the resource it needs while RX flowgraph is busy at processing?

Any explanations to this observation and any advice about how to tackle this will be greatly appreciated!

Thanks,
Yang

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]