linux 局域网 TCP优化

本文介绍了如何在Linux系统中配置和检查TCP的拥塞控制算法,包括设置内核参数并启用highspeed算法。通过调整这些参数,可以优化网络性能。同时,提供了检查当前使用的TCP拥塞控制算法的方法,展示如何使用sysctl命令查看cubic作为默认算法。
摘要由CSDN通过智能技术生成

net.core.netdev_max_backlog = 20480
net.core.optmem_max = 4088000
net.core.rmem_default = 262144
net.core.rmem_max = 4088000
net.core.wmem_default = 513920
net.core.wmem_max = 4088000
net.core.somaxconn = 1024
net.ipv4.tcp_window_scaling = 1
net.ipv4.tcp_max_syn_backlog = 262144
net.ipv4.tcp_tw_reuse = 1
net.ipv4.tcp_mem = 131072  262144  524288
net.ipv4.tcp_rmem = 131400  256960  4088000
net.ipv4.tcp_wmem = 131400  256960  4088000
net.ipv4.udp_mem = 131072  262144  524288
net.ipv4.udp_rmem_min = 513920
net.ipv4.udp_wmem_min = 513920
net.ipv4.tcp_reordering = 64
#net.ipv4.tcp_low_latency = 1
net.ipv4.tcp_app_win = 64
#inet.ipv4.tcp_westwood = 1
#net.ipv4.tcp_bic = 1
net.ipv4.tcp_mtu_probing=1
net.ipv4.tcp_congestion_control=highspeed
net.ipv6.conf.all.disable_ipv6 = 1

net.ipv4.tcp_congestion_control=highspeed 是Linux TCP的一种拥塞控制算法。 内核配置时没有选中就不要添加了。

把上述保存到 /etc/sysctl.conf 
执行 /sbin/sysctl -p 使配置生效。

在Linux上检查TCP拥塞控制算法

默认情况下,Linux使用Reno和CUBIC拥塞控制算法,要检查可用的拥塞控制算法

sysctl net.ipv4.tcp_available_congestion_control
输出如下:

net.ipv4.tcp_available_congestion_control = cubic reno

要检查当前使用的拥塞控制算法

sysctl net.ipv4.tcp_congestion_control
输出如下:

net.ipv4.tcp_congestion_control = cubic

使用 cubic 这个默认的算法。


原文链接:https://blog.csdn.net/xiaoting451292510/article/details/105308764

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值