Increase receive buffer to eliminate packet drop problem on some Windows computers

There are some customers facing packet drop problems when using Windows computers to visualize the data from an OS lidar.

This problem might not happen for a 32 or 64-beam OS lidar because of the lower data volume per second. But for a 128-beam lidar, the high data rate, especially in dual return or 2048, 4096 lidar mode, can cause packet drop issues on a Windows computer without proper operating system configuration.

Under such condition, the packet drop problem is caused by Windows and not the lidar. Ouster lidars are engineered to drop zero packets across all operating modes and conditions, so long as they are used with a properly configured client network and computer.

Example Test Setup
Below is a picture to show that the points data from an OS lidar was broadcast to two computers with the same model (ThinkPad T490) but different Operating Systems (Windows 10 and Ubuntu 20.04).

The video can be found from the following link:
https://drive.google.com/drive/folders/154qFc3y2Fi3SLdwYYxQn6gFP83c72Bca?usp=sharing

If the packets are dropped by the lidar, the same loss of data in the point cloud should be observed on the two computers. In this case, only on the Windows 10 computer packet drop issue happened while on the Ubuntu computer points displayed smoothly without a packet drop.

This data broadcasting test can prove that lidar worked well and packet drop problem was not caused by the OS lidar.

Solving Packet Drops on Windows 10

This packet drop problem that happened to the Windows 10 computer can be solved by increasing the receive buffer. Here are the steps:

  1. Go to Network Connections
  2. Right click the connection interface and choose Properties
  3. Click the Configure button
  4. Click the Advanced tab
  5. Select the Receive buffers Property and increase the value to 1024 or 2048.
  6. Click OK to restart the network interface.

Then connect the lidar to the Windows 10 computer and visualise the points with OusterStudio or ouster-sdk visualisation tool.

Here in my test, I connected two 128-beam lidar sensors to the same Windows 10 computer, no packet drop problem arose again.

The video can be found from the following link:
https://drive.google.com/drive/folders/154qFc3y2Fi3SLdwYYxQn6gFP83c72Bca?usp=sharing

2 Likes

I could add that this also applies to other operation systems, not only Windows.

1 Like

If you’re seeing packet drops on a Linux device then there are a number of things you can try:

Firstly, you can query the receive buffer size by entering the following on the command line and looking at the Current hardware settings for RX:

	ethtool -g <network_interface>

Then try increasing the buffer size as much as possible (2048 for example) by entering the following command line:

	sudo ethtool -G <network_interface> rx 2048

Next set the MTU (Maximum Transmission Unit) to be as large as possible by entering the following command

	sudo ifconfig <network_interface> mtu 9000

In addition you can try changing the packet queue size using the following commands

	sudo sysctl -w net.core.rmem_max=16777216
	sudo sysctl -w net.core.rmem_default=16777216

This usually cures packet drops on Linux

2 Likes

Here is another set of Linux settings to try as well.

  • Show UDP stats:
    • cat /proc/net/udp
  • View current default UDP buffer:
    • sudo sysctl net.core.rmem_default
  • Set max UDP buffer to 25MB:
    • sudo sysctl -w net.core.rmem_max=26214400
  • Set default UDP buffer to 2MB:
    • sudo sysctl -w net.core.rmem_default=2097151

Here is another way to increase Windows buffer that might help : Add instructions for increasing Windows UDP receive buffer size · Issue #1 · lcm-proj/lcm-proj.github.io · GitHub

1 Like