Increasing UDP Buffers in Linux

The default buffer sizes in Linux are woefully small for any services that make heavy use of UDP. The default RX buffer limit is set to 208kB.

CUWB Networks running with a reasonable quantity of nodes (say 30 or more) or that are running at high position rates (say 100Hz or greater) may experience loss of data due to these default limits. The data loss can be hard to notice, but usually has the affect of more jitter in the position computed for devices or anchors dropping out in the CUWB Viewer.

When installing the latest versions of CUWB Network (3.3.0 and greater) the user is prompted with a chance to set the default UDP buffers to a more reasonable figure (100MB). If you choose not to increase the buffers during installation, you can always reconsider this decision by running sudo dpkg-reconfigure cuwb-network.

Changing the UDP buffer limit can significant impact on system performance. We recommend setting this regardless of the size or speed of your setup.

Docker
If you are running in a docker container, you will find that docker does not allow you to set this setting, because it inherits the values from the host system. If the host system is linux, then the following will help you setup the host appropriately.

To make the change on a running system, run the following command:
sudo sysctl -w net.core.rmem_max=104857600
Then restart the CUWB Network. This change will go away upon system reboot.

To make the changes permanent, edit the file /etc/sysctl.conf. Add the following line to the bottom:
net.core.rmem_max=104857600

This change will only take place upon reboot.