Open KamranBinaee opened 4 years ago
160 GB of USB memory seems a bit excessive. Where does this value come from?
That's definitely a typo. The recommended value is anything above 1000 Mb and it's pretty straightforward to calculate. Once we have the final fps and resolution this is what we'd need to do.
Okay, reopening this for now. The link describes an approach that avoids modifying grub settings, I think we should go with that.
One image is 2048*1536*3 B = 9 MB, so for 300 buffers we'd need 2700 MB. Not sure how many buffers we need though.
I think that's far more than what we need. Especially because I've set the buffer handling mode to the "latest only" we technically don't use those buffers. Unless for other use cases, where for some reason there's a lag between threads. But even in that case, at least I can't see any condition that we'd need more than that. I also found another repo that uses this parameter to read from three FLIR cameras, which makes sense. We can definitely stress-test this with the higher frame rate Chameleon (half resolution though!)
On Linux systems, the USB-FS memory is restricted to 16 MB or less by default. To increase this limit we should update the grub. More specifically, in
/etc/default/grub
Replace: GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" with this: GRUB_CMDLINE_LINUX_DEFAULT="quiet splash usbcore.usbfs_memory_mb=160000"