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

There are customers facing packet drop problems when using Windows computers to visualise the points from an OS lidar from time to time.

This problem might seldom happens to a 32-beam OS lidar or 64-beam OS lidar because of its low data volume per second.
But for a 128-beam lidar, the high data rate, especially in dual return or 2048, 4096 lidar mode, sometimes makes it possible for a customer to see packet drop issues on a Windows computer.

Under such condition, most of the time the packet drop problem is not caused by the OS lidar.
Here 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 packet dropped from the lidar side, exactly the same packet-dropped point cloud should be observed on both the two computers, but actually 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.

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

  1. Go to Network Connections
  2. Right click the connection interface and choose Properties
    1714110341303
  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