You can check with netstat -su command whether you are experiencing a lot of dropped logs on your Linux server:


If you are, you need to add additional UDP parameters inside /etc/sysctl.conf :

Kernel parameters
net.core.rmem_max=16777216
net.core.rmem_default=16777216

net.ipv4.udp_rmem_min = 4096
net.ipv4.udp_mem = 4096 87380 16777216
net.core.netdev_max_backlog = 2000

Afterwards, apply it with sysctl -p and restart the machine.

Explanation

net.core.rmem_max and net.core.rmem_default - Recommended  solution
UDP receive buffer size and we need to set it to 16MB (enough for Gigabit Networking)
net.ipv4.udp_rmem_minMinimal size of receive buffer used by UDP. Default is 1 page(4096) and can be set to have higher values
net.ipv4.udp_memManagement option, set with PAGE_SIZE=4096 (4K)
net.core.netdev_max_backlogQueue size for incoming packets
  • No labels

1 Comment

  1. net.core.rmem_max=33554432
    net.core.rmem_default=31457280

    net.ipv4.udp_rmem_min = 16384
    net.ipv4.udp_mem = 65536 131072 262144
    net.core.netdev_max_backlog = 65536