linux网卡udp缓冲区

One of the most common causes of UDP datagram lost on Linux is an undersized receive buffer on the Linux socket. How to enlarge Linux UDP buffer size?

Linux上丢失UDP数据报的最常见原因之一是Linux套接字上的接收缓冲区太小。 如何扩大Linux UDP缓冲区大小?

On Linux, you can change the UDP buffer size (e.g. to 26214400) by (as root):

在Linux上,您可以通过(以root用户身份)更改UDP缓冲区大小(例如,更改为26214400):

sysctl -w net.core.rmem_max=26214400

The default buffer size on Linux is 131071.

Linux上的默认缓冲区大小为131071

You can also make it permanent by adding this line to /etc/sysctl.conf:

您还可以通过将以下行添加到/etc/sysctl.conf中来使其永久:

net.core.rmem_max=26214400

Reference: Improving UDP Performance by Configuring OS UDP Buffer Limits. It also provides methods for changing UDP buffer sizes on Solaris, FreeBSD, Darwin and AIX.

参考:通过配置OS UDP缓冲区限制来提高UDP性能。 它还提供了在Solaris,FreeBSD,Darwin和AIX上更改UDP缓冲区大小的方法。

Answered by Eric Z Ma.
埃里克·马(Eric Z Ma)回答。

翻译自: https://www.systutorials.com/how-to-enlarge-linux-udp-buffer-size/

linux网卡udp缓冲区

Logo

魔乐社区(Modelers.cn) 是一个中立、公益的人工智能社区,提供人工智能工具、模型、数据的托管、展示与应用协同服务,为人工智能开发及爱好者搭建开放的学习交流平台。社区通过理事会方式运作,由全产业链共同建设、共同运营、共同享有,推动国产AI生态繁荣发展。

更多推荐