这几天在主机上测试了udp的收发程序 发和收都在一台机子上 发现怎么弄都丢包 后来猜想可能是协议栈太小 于是在/etc/sysctl.conf 里增加了
net.core.rmem_default = 16777216
net.core.rmem_max = 16777216
net.core.wmem_default = 16777216
net.core.wmem_max = 16777216
net.core.netdev_max_backlog=3000
然后 sysctl -p 就显示
sysctl: cannot stat /proc/sys/ net/core/rmem_default: 没有那个文件或目录
sysctl: cannot stat /proc/sys/ net/core/rmem_max: 没有那个文件或目录
sysctl: cannot stat /proc/sys/ net/core/wmem_default: 没有那个文件或目录
sysctl: cannot stat /proc/sys/ net/core/wmem_max: 没有那个文件或目录
我也不知道是不是设置成功了
通过 sysctl -a |grep net.core 命令还是显示默认的配置 求解呀。。。。