UDP SndbufErrors issue

Latest response

Hi experts,

I have an application which sending udp packets, but there was a packets loss issue, when I used command "cat /proc/net/snmp|grep -w Udp", I saw the value of "SndbufErrors" keep increasing, what does the value mean, how do i resolve this issue?

Responses

This is grown if there is no socket write buffer space, or if there was no kernel memory available, or if there was an IP receive error.

You could ensure the net.core.wmem_default and net.core.wmem_max and net.ipv4.udp_mem are not too small, that the application is not requesting a too-small socket buffer, try increasing the vm.min_free_kbytes tunable to maybe 512 MiB or 1 GiB, and ensure there is no transmit failure in tc -s qdisc or ethtool -S ethX.

I presume an IP receive event would require feedback from the other end, like an ICMP error return which should then appear as a socket error to the sending program. If you aren't getting program errors then some sort of memory/transmit failure seems more likely to me.