Hi Zack,
I would not count on equal performance between saving to a RAM file system
versus allocating your own buffers, but I don't know the reason. I think it
is worth a try to configure as large a RAM file system as you can and run
rx_samples_to_file (which will not create large RAM buffers).  Plus, this
is a pretty easy test to run.

I can tell you that long ago I got pretty good performance by writing to
files in RAM (up to a predetermined fixed length) such that after a fixed
number of samples, I closed those files and opened new ones and continued
writing to the new ones.  As a separate process, the closed files were
moved to persistent storage thus free-ing up RAM.  This sounds a lot like
your circular buffer in RAM concept but I was never able to get the
circular buffer architecture working as well.
Rob

On Tue, Mar 12, 2024 at 1:00 PM <zackk...@utexas.edu> wrote:

> Hey Rob,
>
> Saving to dev/null worked just fine, and didn’t even output the “Disk
> write test indicates that an overflow is likely to occur” warning.
>
> In terms of saving to RAM, isn’t this essentially what my custom script
> does? I reserve all my buffers (which increases my RAM usage by a lot) and
> have a separate thread write from these to the filesystem.
>
> Would anything be different if I used a ramdisk? I can try it out.
>
> As for DPDK, I tried in the past to get it working but keep running into
> issues. I will post the output below, but it may warrant a separate post.
>
> When running:
>
> ./rx_samples_to_file --args 
> "addr=192.168.10.2,second_addr=192.168.20.2,mgmt_addr=192.168.1.19,use_dpdk=1"
>  --file /dev/null --duration 10 --rate 491.52e6 --freq 1575.42e6
>
> I get:
>
> Creating the usrp device with: 
> addr=192.168.10.2,second_addr=192.168.20.2,mgmt_addr=192.168.1.19,use_dpdk=1...
>
> [INFO] [UHD] linux; GNU C++ version 9.4.0; Boost_107100; DPDK_19.11; 
> UHD_4.6.0.HEAD-0-g50fa3baa
>
> EAL: Detected 24 lcore(s)
>
> EAL: Detected 2 NUMA nodes
>
> EAL: Multi-process socket /run/user/1001/dpdk/rte/mp_socket
>
> EAL: Selected IOVA mode 'VA'
>
> EAL: No available hugepages reported in hugepages-1048576kB
>
> EAL: Probing VFIO support...
>
> EAL: VFIO support initialized
>
> EAL: get_seg_fd(): open '/dev/hugepages/rtemap_0' failed: Permission denied
>
> EAL: Couldn't get fd on hugepage file
>
> EAL: get_seg_fd(): open '/dev/hugepages/rtemap_32768' failed: Permission 
> denied
>
> EAL: Couldn't get fd on hugepage file
>
> EAL: error allocating rte services array
>
> EAL: FATAL: rte_service_init() failed
>
> EAL: rte_service_init() failed
>
> [ERROR] [DPDK] Error with EAL initialization
>
> [ERROR] [UHD] Device discovery error: RuntimeError: Error with EAL 
> initialization
>
> EAL: FATAL: already called initialization.
>
> EAL: already called initialization.
>
> [ERROR] [DPDK] Error with EAL initialization
>
> [ERROR] [X300] X300 Network discovery error RuntimeError: Error with EAL 
> initialization
>
> Error: LookupError: KeyError: No devices found for ----->
>
> Device Address:
>
>     addr: 192.168.10.2
>
>     second_addr: 192.168.20.2
>
>     mgmt_addr: 192.168.1.19
>
> use_dpdk: 1
>
>
> When I run the same command as the root user, I get:
>
> Creating the usrp device with: 
> addr=192.168.10.2,second_addr=192.168.20.2,mgmt_addr=192.168.1.19,use_dpdk=1...
>
> [INFO] [UHD] linux; GNU C++ version 9.4.0; Boost_107100; DPDK_19.11; 
> UHD_4.6.0.HEAD-0-g50fa3baa
>
> EAL: Detected 24 lcore(s)
>
> EAL: Detected 2 NUMA nodes
>
> EAL: Multi-process socket /var/run/dpdk/rte/mp_socket
>
> EAL: Selected IOVA mode 'VA'
>
> EAL: No available hugepages reported in hugepages-1048576kB
>
> EAL: Probing VFIO support...
>
> EAL: VFIO support initialized
>
> EAL: PCI device 0000:31:00.0 on NUMA socket 0
>
> EAL:   probe driver: 15b3:101d net_mlx5
>
> EAL: PCI device 0000:31:00.1 on NUMA socket 0
>
> EAL:   probe driver: 15b3:101d net_mlx5
>
> [ERROR] [DPDK] Could not find route to destination address 192.168.10.2
>
> [ERROR] [X300] X300 Network discovery error RuntimeError: DPDK: Could not 
> find route to destination address 192.168.10.2
>
> [INFO] [MPMD] Initializing 1 device(s) in parallel with args: 
> mgmt_addr=192.168.1.19,type=x4xx,product=x410,serial=326E872,name=ni-x4xx-326E872,fpga=CG_400,claimed=False,addr=192.168.10.2,second_addr=192.168.20.2,use_dpdk=1
>
> [WARNING] [MPM.RPCServer] A timeout event occured!
>
> [INFO] [MPM.PeriphManager] init() called with device args 
> `fpga=CG_400,mgmt_addr=192.168.1.19,name=ni-x4xx-326E872,product=x410,second_addr=192.168.20.2,use_dpdk=1,clock_source=internal,time_source=internal,initializing=True'.
>
> [ERROR] [DPDK] Could not find route to destination address 192.168.10.2
>
> [WARNING] [MPMD::XPORT::UDP] Error during MTU discovery on address 
> 192.168.10.2: RuntimeError: DPDK: Could not find route to destination address 
> 192.168.10.2
>
> [ERROR] [RFNOC::MGMT] EnvironmentError: IOError: Timed out getting recv buff 
> for management transaction
>
> [ERROR] [RFNOC::GRAPH] IO Error during GSM initialization. EnvironmentError: 
> IOError: Timed out getting recv buff for management transaction
>
> [ERROR] [RFNOC::GRAPH] Caught exception while initializing graph: 
> EnvironmentError: IOError: Timed out getting recv buff for management 
> transaction
>
> Error: RuntimeError: Failure to create rfnoc_graph.
>
> _______________________________________________
> USRP-users mailing list -- usrp-users@lists.ettus.com
> To unsubscribe send an email to usrp-users-le...@lists.ettus.com
>
_______________________________________________
USRP-users mailing list -- usrp-users@lists.ettus.com
To unsubscribe send an email to usrp-users-le...@lists.ettus.com

Reply via email to