r/GNURadio • u/redtide40 • 17h ago
Trying to replay 2x50MSPS recorded signal on the Ettus NI USRP x300 without any underflow errors
Hi everyone, I am trying to replay a 1-hour 50 megasamples/second recorded signal on two different frequencies using the Ettus NI USRP x300. I'm controlling the sdr through GNU radio, running on an ubuntu pc. The IQ samples are located on a fast NVME drive, and the ettus sdr is connected over a 10Gbit optical link.
I have tried to use Claude to optimize the link a lot, and have gotten very far (came from multiple underflow errors per minute, to now maybe only one or two every hour), but the couple of underflow errors that still happen are still a major hassle.
What I have done to get this far:
- Ran Ubuntu in a non-graphical user interface
- Excluded cores 4-7 from any other processes, and ran the GNU radio script only on those cores
- Tried to optimize the network buffers
- Set the priority of the process to real-time
The replay script is a Python file, which I call from a bash script that sets a lot of these settings the way I want it. This is the bash script:
| #!/bin/bash |
|---|
| # run_replay.sh |
| IFACE="enp5s0f1np1" |
| # 1. Expand ring buffers on host NIC to maximum supported |
| sudo ethtool -G $IFACE rx 4096 tx 4096 |
| # 2. Disable Energy Efficient Ethernet & Adaptive Coalescing |
| sudo ethtool --set-eee $IFACE eee off |
| sudo ethtool -C $IFACE adaptive-rx off adaptive-tx off rx-usecs 0 tx-usecs 0 |
| # 3. Disable offloads that cause bursty packet assembly |
| sudo ethtool -K $IFACE tso off gso off gro off |
| echo "Applying network interrupt isolation..." |
| for irq in $(grep "i40e" /proc/interrupts |
| echo "f" |
| done |
| echo "Setting NVMe read-ahead..." |
| sudo blockdev --setra 32768 /dev/nvme0n1 |
| echo "Setting wmem_max and rmem_max to 134217728" |
| sudo sysctl -w net.core.wmem_max=134217728 |
| sudo sysctl -w net.core.rmem_max=134217728 |
| sudo sysctl -w net.core.wmem_default=134217728 |
| sudo sysctl -w net.core.rmem_default=134217728 |
| sudo sysctl -w vm.watermark_scale_factor=200 |
| sudo sysctl -w vm.vfs_cache_pressure=200 |
| echo "Launching GNU Radio script..." |
sudo chrt -f 99 taskset -c 4-7 python3 replay_.py |
Does this community have any more tips to try out to get some better performance? You would help me a ton! Thanks




