TCP – F1-CONSULT https://www.f1-consult.com Our Network For Your Network Tue, 27 Apr 2021 08:09:05 +0000 en-US hourly 1 https://wordpress.org/?v=7.1.3 https://www.f1-consult.com/wp-content/uploads/2018/01/cropped-F1-CONSULT-favicon-32x32.png TCP – F1-CONSULT https://www.f1-consult.com 32 32 LINUX – Network Throughput Tuning https://www.f1-consult.com/linux/lan/throughput-tuning/ Fri, 14 Sep 2018 13:13:39 +0000 https://www.f1-consult.com/?p=3977 General Approach

To check what setting your system is using, use ‘sysctl name’ (e.g.: ‘sysctl net.ipv4.tcp_rmem’). To change a setting use ‘sysctl -w’. To make the setting permanent add the setting to the file ‘sysctl.conf’.

cho > /etc/sysctl.conf
echo -e "\
# /etc/sysctl.conf \r
# ---------------- BEGIN ---------------- \r
# to load new settings \r
# sysctl --load /etc/sysctl.conf \r
# \r
### TCP tuning \r
# \r
# For hosts with 10G NIC optimized for network paths up to 200ms RTT, or a 40G NIC up on paths up to 50ms RTT \r
# allow testing with 512MB buffers \r
net.core.rmem_max = 536870912 \r
net.core.wmem_max = 536870912 \r
# \r
# increase Linux autotuning TCP buffer limits \r
# min, default, and max number of bytes to use  \r
# allow auto-tuning up to 128MB buffers \r
net.ipv4.tcp_rmem = 4096 87380 268435456 \
net.ipv4.tcp_wmem = 4096 65536 268435456 \r
# \r
# recommended to increase this for CentOS6 with 10G NICS or higher \r
net.core.netdev_max_backlog = 250000 \r
# \r
# don't cache ssthresh from previous connection \r
net.ipv4.tcp_no_metrics_save = 1 \r
# \r
# recommended default congestion control is htcp \r 
# test with 'sysctl net.ipv4.tcp_available_congestion_control'
net.ipv4.tcp_congestion_control = reno \r
# \r
# recommended for hosts with jumbo frames enabled \r
net.ipv4.tcp_mtu_probing = 1 \r
# \r
# recommended for CentOS7/Debian8 hosts \r
net.core.default_qdisc = fq \r
# \r
fs.inotify.max_user_watches = 100000 \r
#\r
# --------------- END ------------------" \
> /etc/sysctl.conf
cat /etc/sysctl.conf
sysctl --load /etc/sysctl.conf
sysctl -p

More Reading:

fasterdata.es.net

]]>