Yunbao VPN

Linux network troubleshooting

Unstable UDP traffic over a VPN? Inspect socket receive buffers

If only UDP-based sessions stutter intermittently, check whether the receiving socket queue or system buffers are under pressure. UDP itself does not guarantee datagram delivery; buffer checks complement application logs and path/peer evidence.

Content updated:

Separate system limits from a socket queue

On Linux, SO_RCVBUF is a socket receive-buffer option; rmem_default and rmem_max set the default and allowed maximum. UDP also has system memory thresholds. These values alone do not show which datagrams a particular VPN process received or dropped.

Collect a read-only snapshot first

These commands inspect state without changing parameters. If process attribution is needed, use the ss process option only when permitted. Its output may contain process names, addresses and ports; redact unrelated details before sharing.

  1. On the affected host, record:
  2. The current time and when the VPN stuttered.
  3. net.core.rmem_default, net.core.rmem_max and net.ipv4.udp_mem.
  4. ss -u -a -m to inspect UDP socket memory.
  5. Take another snapshot during the issue and compare queues and drop counts.
  6. Read-only command: cat /proc/sys/net/core/rmem_default /proc/sys/net/core/rmem_max /proc/sys/net/ipv4/udp_mem; ss -u -a -m

How to read ss memory fields

The ss -m option shows socket-memory fields: r is memory allocated to receive packets, rb is the receive-buffer limit, and d is packets dropped before demultiplexing to the socket. Compare the same socket over time rather than relying on one reading, and correlate changes with application logs and the failure time.

Check whether the issue is specific to the UDP path

Compare before and after on the same device, destination and similar time window. Check whether server application logs show receive gaps and whether the peer sees missing sends or receives. TCP working while UDP fails narrows the scope, but does not identify a cause by itself.

Avoid changing limits without evidence

Do not raise rmem_max just because its value looks small. Preserve socket snapshots, settings, timing, process and direction first, then ask the server administrator to assess them. Congestion, MTU, peer limits and application processing can produce similar symptoms.

References and further reading

Back to all guides

Ready to connect?

Get the app from the official website and follow the instructions for your device.

Download ↓