# 1m\_ipv4\_udp\_send\_buffer\_errors

**URL:** <https://community.netdata.cloud/t/1m-ipv4-udp-send-buffer-errors/2106>\
**Category:** Alerts\
**Created:** [November 4, 2021, 4:42pm UTC](https://community.netdata.cloud/t/1m-ipv4-udp-send-buffer-errors/2106 "2021-11-04T16:42:54Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tasos\_Katsoulas](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.netdata.cloud/tasos_katsoulas/32/1344_2.png) [@Tasos\_Katsoulas](https://community.netdata.cloud/u/Tasos_Katsoulas)\
**Post date:** [November 4, 2021, 4:42pm UTC](https://community.netdata.cloud/t/1m-ipv4-udp-send-buffer-errors/2106/1 "2021-11-04T16:42:54Z")

</div>

# 1m\_ipv4\_udp\_send\_buffer\_errors

## OS: Linux

_In computer networking, the User Datagram Protocol (UDP) is one of the core members of the Internet  
protocol suite._

The linux kernel allocates buffers to serve the UDP protocol operations. Data is written into  
sockets that utilize UDP to send data to an another system/subsystem.

The Netdata Agent monitors the average number of UDP send buffer errors over the last minute. This  
alert indicates that the UDP send buffer is full or no kernel memory available. Receiving this alert  
means that your system is dropping outgoing UDP packets

This alert is triggered in warning state when the number of UDP send buffer errors over the last  
minute is more than 10.

> **See more on UDP protocol**
>
> > UDP uses a simple connectionless communication model with a minimum of protocol mechanisms. UDP  
> > provides checksums for data integrity, and port numbers for addressing different functions at the  
> > source and destination of the datagram. It has no handshaking dialogues, and thus exposes the user’s  
> > program to any unreliability of the underlying network. There is no guarantee of delivery, ordering,  
> > or duplicate protection.[1](https://en.wikipedia.org/wiki/User_Datagram_Protocol) If no  
> > firewall exists any host can send udp packets to any port, which your server doesn’t listen.

Send buffer sizes for UDP are controlled by 4  
variables. [2](https://man7.org/linux/man-pages/man7/udp.7.html)

- `net.core.wmem_default`, the default setting of the socket send buffer in bytes.

- `net.core.wmem_max`, default and max socket send buffer size in bytes. Each socket gets `wmem_default` send buffer size by default, and can request up to `wmem_max` with `setsockopt` option `SO_SNDBUF`.

- `net.ipv4.udp_mem`, this is a vector of three integers (min, pressure, max) governing the number  
of pages allowed for queueing by all UDP sockets.

- `net.ipv4.udp_wmem`, the minimal size (in bytes) of send buffer used by UDP sockets in moderation. Each UDP socket is able to use the size for sending data, even if total pages of UDP sockets exceed `udp_mem` pressure.

In general, issues with buffers that allocated dynamically are correlated with the kernel memory,  
you must always be aware of memory pressure events. This can cause buffer errors.

> **References and sources**
>
> 1. [UDP definition on wikipedia](https://en.wikipedia.org/wiki/User_Datagram_Protocol)
> 2. [Man page of UDP protocol](https://man7.org/linux/man-pages/man7/udp.7.html)
> 3. [Redhat networking tuning guide](https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/5/html/tuning_and_optimizing_red_hat_enterprise_linux_for_oracle_9i_and_10g_databases/sect-oracle_9i_and_10g_tuning_guide-adjusting_network_settings-changing_network_kernel_settings)

### Troubleshooting section:

> **Increase the net.core.wmem\_default and net.core.wmem\_max values**
>
> 1. Try to increase them, RedHat suggests the value of 262144  
> bytes [3](https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/5/html/tuning_and_optimizing_red_hat_enterprise_linux_for_oracle_9i_and_10g_databases/sect-oracle_9i_and_10g_tuning_guide-adjusting_network_settings-changing_network_kernel_settings) 
> 
> 2. Verify the change and test with the same workload that triggered the alarm originally.
> 
> 3. If this change works for your system, you could make it permanently.
> 
> 4. Reload the sysctl settings.
