I am trying to log camera data to an external SSD using the voxl-logger utility, with the SSD hooked up to the J3 port of the VOXL2 mini. According to voxl-inspect-cam, the frames I'm trying to save are ~3.11MB, so at 30FPS would require around 93MBps write speed. The external ssd we have hooked up (temporarily) is a 2TB samsung T7 shield, which has an advertised write speed of up to 1000MBps, well over what we need.
The main problem is voxl-logger's output:
voxl-logger -c hires_small_color -d /mnt/ssd
Welcome to voxl-logger
1906214 MB left in /mnt/ssd/
starting new log: /mnt/ssd/log0001/
connected to ch 0 /run/mpa/hires_small_color/
flushing backed up pipe ch 0 /run/mpa/hires_small_color/
flushing backed up pipe ch 0 /run/mpa/hires_small_color/
flushing backed up pipe ch 0 /run/mpa/hires_small_color/
flushing backed up pipe ch 0 /run/mpa/hires_small_color/
flushing backed up pipe ch 0 /run/mpa/hires_small_color/
flushing backed up pipe ch 0 /run/mpa/hires_small_color/
flushing backed up pipe ch 0 /run/mpa/hires_small_color/
flushing backed up pipe ch 0 /run/mpa/hires_small_color/
flushing backed up pipe ch 0 /run/mpa/hires_small_color/
flushing backed up pipe ch 0 /run/mpa/hires_small_color/
flushing backed up pipe ch 0 /run/mpa/hires_small_color/
flushing backed up pipe ch 0 /run/mpa/hires_small_color/
flushing backed up pipe ch 0 /run/mpa/hires_small_color/
flushing backed up pipe ch 0 /run/mpa/hires_small_color/
flushing backed up pipe ch 0 /run/mpa/hires_small_color/
ERROR: invalid metadata, magic number=-2055633543, expected 1448040524
most likely client fell behind and pipe overflowed
flushing backed up pipe ch 0 /run/mpa/hires_small_color/
flushing backed up pipe ch 0 /run/mpa/hires_small_color/
It works for a while, then eventually something backs up and the logger prints this debug message infinitely. It becomes unresponsive and I can't kill it with Ctrl+C. It seems like there's some bottleneck preventing the client (voxl-logger?) from receiving frames at the correct rate from the mpa pipe.
I am aware of the potential issues with the superspeed lines of the connector, but I get this output when taking the diagnostic steps that page details:
voxl2:/$ lsusb -t
/: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 10000M
|__ Port 1: Dev 23, If 0, Class=Mass Storage, Driver=usb-storage, 10000M
/: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 480M
So I don't think datarates on the port/cable are the issue, and unless samsung is lying on their documentation by over 10x, I dont know how the ssd itself could be the issue either.
I was also able to test the data rate to this SSD with dd (linux utility) and saw some weird stuff. When trying to push lumps of data ~2GB, it would push the first 80% extremely fast (like 900MBps) and then lock up on the remaining data and take over 40s to transfer the rest. Seeing that made me think it could also be browning out.
Is there anything I am doing wrong / falsely expecting the VOXL2 to be able to perform? I can try a regular VOXL2 with the USB3 expansion and see if that works better for now, but in the end we need to use the mini anyway so I would like to get this issue figured out.
Thank you!