title: UDP receive queue full?
body: <p>I have an application that receives heavy UDP traffic on port 12201 and I have noticed that some of the UDP packets never make into the application (received by kernel only).</p>
  
  <p>When I run</p>
  
  <pre><code>netstat -c --udp -an | grep 12201
  </code></pre>
  
  <p>I can see that Recv-Q is almost always 126408, rarely going below, never going above:</p>
  
  <pre><code>Proto Recv-Q Send-Q Local Address Foreign Address State
  udp 126408 0 :::12201 :::*
  udp 126408 0 :::12201 :::*
  udp 126408 0 :::12201 :::*
  udp 126408 0 :::12201 :::*
  udp 126408 0 :::12201 :::*
  udp 126408 0 :::12201 :::*
  udp 126408 0 :::12201 :::*
  udp 126408 0 :::12201 :::*
  udp 126408 0 :::12201 :::*
  udp 126408 0 :::12201 :::*
  udp 126408 0 :::12201 :::*
  udp 126408 0 :::12201 :::*
  udp 126408 0 :::12201 :::*
  udp 126408 0 :::12201 :::*
  udp 126408 0 :::12201 :::*
  udp 126408 0 :::12201 :::*
  udp 126408 0 :::12201 :::*
  </code></pre>
  
  <p>Does this mean that receive queue is full? Where does number 126408 come from? How can I increase it?</p>
  
  <p>Sysctl config:</p>
  
  <pre><code># sysctl -a | grep mem
  vm.overcommit_memory = 0
  vm.nr_hugepages_mempolicy = 0
  vm.lowmem_reserve_ratio = 256   256     32
  vm.meminfo_legacy_layout = 1
  vm.memory_failure_early_kill = 0
  vm.memory_failure_recovery = 1
  net.core.wmem_max = 124928
  net.core.rmem_max = 33554432
  net.core.wmem_default = 124928
  net.core.rmem_default = 124928
  net.core.optmem_max = 20480
  net.ipv4.igmp_max_memberships = 20
  net.ipv4.tcp_mem = 365760       487680  731520
  net.ipv4.tcp_wmem = 4096        16384   4194304
  net.ipv4.tcp_rmem = 4096        87380   4194304
  net.ipv4.udp_mem = 262144       327680  393216
  net.ipv4.udp_rmem_min = 4096
  net.ipv4.udp_wmem_min = 4096
  </code></pre>