Important info up front:
Hardware: USRP B210
Driver: Version: [INFO] [UHD] linux; GNU C++ version 4.8.5 20150623 (Red
Hat 4.8.5-16); Boost_106700; UHD_3.11.1

I have an application that receives and transmits at the same time. The
application receives a stream of data, does some simple processing, and
transmits a response. I have three separate threads: one that gets data
from the rx_streamer and writes to an Rx buffer, one that processes data
from the Rx buffer and writes a response to a Tx buffer, and one that reads
data from the Tx buffer and writes to a tx_streamer. The Rx and Tx streams
are started using timed commands such that the Rx stream leads the Tx
stream by 1 millisecond. The blocksize I'm using for Rx and Tx is much less
than 1 millisecond and is determined by rx_streamer->get_max_num_samps().
I've profiled the processing routine, and it's about 20x faster than my
rx_streamer sample rate, so I'm confident I'm able to keep up with the
incoming data rate in the processing thread.

I'm running into an issue which is causing underflows. *Every once and a
while, my call to rx_streamer->recv() stalls for a bit, sometimes for 3-5
milliseconds.* The next several calls are very fast, like it's trying to
catch up. I don't see any overflows on the Rx side. However, the initial
stall delay is enough to starve my tx_streamer and cause underflows. Over
time, my tx_streamer incurs a significant delay with respect to my
rx_streamer.

In order to further investigate the issue, I wrote a simple,
single-threaded program that just starts an rx_stream and times the calls
to recv(). I see the occasional stalls in this program as well.

What could be causing these stalls, and are there any settings that might
minimize them? My gut is telling me it's at the USB driver level and not at
the UHD level.  I've tried "renicing" the process to a high priority in
case it's a scheduling issue, but that didn't seem to have any effect.

Thanks for help,
Daniel
_______________________________________________
USRP-users mailing list
USRP-users@lists.ettus.com
http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com

Reply via email to