• CUWB v5.0
APD002 - Linux UDP Buffers

Introduction

The default UDP buffer sizes in Linux are typically too small for applications that generate or process high volumes of UDP traffic. By default, the Linux receive (RX) buffer limit is approximately 208 kB, which can be insufficient for CUWB Systems operating under higher load conditions. CUWBNets with 30 or more nodes, or systems running at position update rates of 100 Hz or greater, may experience packet loss as a result of these limits. Because UDP does not retransmit dropped packets, this data loss can be subtle and difficult to detect. It often presents as increased position jitter, irregular update timing, or Anchors intermittently disappearing in the CUWB Viewer.

The CUWB Manager Package installer provides an option to increase the UDP buffer limits to a more appropriate value of 100 MB. It is strongly recommended to accept this configuration change during installation. If you chose not to increase the buffers at that time, you can modify the setting later by running sudo dpkg-reconfigure cuwb-manager and following the prompts. Increasing the UDP buffer limit can significantly improve system stability and overall performance by reducing packet drops and smoothing data flow. This adjustment is recommended for all CUWB deployments, regardless of system size or operating speed, as even moderate traffic levels can exceed the default Linux buffer thresholds.

Docker

If you are running a CUWB System inside a Docker container, you may find that these UDP buffer settings cannot be modified from within the container itself. Docker containers inherit kernel networking parameters from the host system, including UDP buffer limits, and do not have permission to change them independently. As a result, any required adjustments to the UDP receive or transmit buffer sizes must be made on the host machine. Once the host’s kernel parameters are updated, the container will automatically use the new values.

Linux

If the host system is Linux, then the following will help you setup the host appropriately.

To make the change on a running system, execute the following command:

sudo sysctl -w net.core.rmem_max=104857600

After executing this command, restart the CUWB Manager for the new limit to take effect. Note that this modification is temporary and will be lost when the Host PC is rebooted.

To make the change permanent, edit the file /etc/sysctl.conf and add the following line to the end of the file:

net.core.rmem_max=104857600

This permanent change will take effect after the next host reboot.

In order to increase the UDP buffers in Linux, there are several system parameters that need to be updated. To update these parameters temporarily you can execute the following commands from a Linux command prompt:

Increasing Receive Buffers

sudo sysctl -w net.core.rmem_default=33445532
sudo sysctl -w net.core.rmem_max=104857600
sudo sysctl -w net.ipv4.udp_mem='33445532 33445532 33445532'
sudo sysctl -w net.ipv4.udp_rmem_min=33445532

Increasing Transmit Buffers

sudo sysctl -w net.core.wmem_default=33445532
sudo sysctl -w net.core.wmem_max=104857600
sudo sysctl -w net.ipv4.udp_mem='33445532 33445532 33445532'
sudo sysctl -w net.ipv4.udp_wmem_min=33445532

These settings increase the default UDP buffer sizes to 32 MB with a maximum of 100 MB. The values shown above can be adjusted if a different configuration is more appropriate for your system’s memory capacity and workload. By default, the buffer sizes in Linux are set to 208 kB, which does not provide a lot of headroom for the processor before the buffers fill up.

After making these changes, you will need to restart all applications that use the UDP buffers in order for them to re-connect to their respective sockets with the new buffer sizes. If the changes are made using the above method, the settings will be lost when the system is rebooted.

To make the change permanent, edit the ‘/etc/sysctl.conf’ file. The file is only editable by root, so you will need to edit the file with root privileges and add the following lines to the end of the file:

net.core.rmem_default = 33445532
net.core.rmem_max = 104857600
net.core.wmem_default = 33445532
net.core.wmem_max = 104857600
net.ipv4.udp_mem = 33445532 33445532 33445532
net.ipv4.udp_rmem_min = 33445532
net.ipv4.udp_wmem_min = 33445532

After adding the lines, run the following command on the server to store the new values immediately. You should see a printout of the updated settings:

sudo sysctl -p

To verify that the settings have been applied, run the following command. You can also run it before making any changes to see the current buffer values:

sudo sysctl -a | grep mem

Again, you will need to stop and restart any applications that use the UDP buffers so they use the new values. You may also choose to simply reboot the system after making the appropriate changes to the sysctl.conf file.

Revision

Version Date Change Description
v5.0.2 2026-02-27 Minor grammar corrections
v5.0.1 2025-10-31 Introduction Update
v5.0.0 2025-09-15 Initial Preliminary Release