歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux管理 >> Linux網絡 >> 初裝Linux網絡優化

初裝Linux網絡優化

日期:2017/2/28 15:52:19   编辑:Linux網絡

Linux系統初裝後TCP memory默認參數配置為128K,在過多進程負載網絡通信的情況下就會出現異常。

可以使用命令擴大使用內存:
#sysctl -w net.core.rmem_max=16777216
#sysctl -w net.core.wmem_max=16777216
##修改為16M

最好同時修改 /etc/sysctl.conf文件,保證系統正常運行:

# These ensure that TIME_WAIT ports either get reused or closed fast.
net.ipv4.tcp_fin_timeout = 1
net.ipv4.tcp_tw_recycle = 1
# TCP memory
net.core.rmem_max = 16777216
net.core.rmem_default = 16777216
net.core.netdev_max_backlog = 262144
net.core.somaxconn = 262144

Copyright © Linux教程網 All Rights Reserved