virtual-machinegnuradiognuradio-companionusrpsoftware-defined-radio

USRP N210 overflows in virtual machine using GnuRadio


I am using the USRP N210 through a Debian (4.19.0-6-amd64 #1 SMP Debian 4.19.67-2+deb10u1) VM and run very quickly into processing overflow. GnuRadio-Companion is printing the letter "D" the moment one of the CPUs load is reaching 100 %. This was tested by increasing the number of taps for a low-pass filter, as shown in the picture with a sampling rate of 6.25 MHz.

I have done all instructions on How to tune an USRP, except the CPU governor. This is because I am not able to do this due to a missing driver reported by cpufreq-info. The exact output is

No or unknown cpufreq driver is active on this CPU.

The output of the lscpu command is also shown in a picture.

Has anyone an idea how I can resolve the problem? Or is GnuRadio just not fully supported for VMs?

enter image description here

enter image description here

enter image description here


Solution

  • Dropping packets when your CPU can't keep up is expected. It's the direct effect of that.

    The problem is most likely to be not within your VM, but with the virtualizer.

    Virtualization adds some overhead, and whilst modern virtualizers have gotten pretty good at it, you're requesting that

    This might take away CPU cycles on your host side that your VM doesn't even know of – your 100% is less than it looks!

    So, first of all, make sure your virtualizer does as little things with the network traffic as possible. Especially, no NAT, but best-case hardware bridging.

    Then, the freq-xlating FIR definitely isn't the highest-performing block. Try using a rotator instead, followed by an FFT FIR. In your case, let that FIR decimate by a factor of 2 – you've done enough low-pass filtering to reduce the sampling rate without getting aliases.

    Lastly, might be a good idea to use a newer version of GNU Radio. In Debian testing, apt will get you a 3.8 release series GNU Radio.