Skip to main content

TCP-Stack Tuning für Linux-Server

Dies ist meine aktuelle sysctl Konfiguration für Linux-Server. Es wird nicht nur der TCP-Stack behandelt, sondern auch Parameter die Kernel und Dateisysteme betreffen.

Nach Änderungen sysctl –system ausführen:

fs.file-max = 100000
fs.inotify.max_user_watches = 524288
fs.protected_hardlinks = 1
fs.protected_symlinks = 1
 
kernel.kptr_restrict = 1
kernel.printk = 4	4	1	7
kernel.sysrq = 176
kernel.yama.ptrace_scope = 1
 
net.core.default_qdisc=fq
net.core.netdev_max_backlog = 30000
net.core.rmem_default = 26214400
net.core.rmem_max = 26214400
net.core.wmem_max = 26214400
 
net.ipv4.conf.all.rp_filter = 1
net.ipv4.conf.default.rp_filter = 1
net.ipv4.ip_local_port_range = 1025	65535
net.ipv4.tcp_congestion_control=bbr
net.ipv4.tcp_fin_timeout = 3
net.ipv4.tcp_max_orphans = 262144
net.ipv4.tcp_max_syn_backlog = 262144
net.ipv4.tcp_mtu_probing = 0
net.ipv4.tcp_no_metrics_save = 1
net.ipv4.tcp_rmem = 4096	87380	16777216
net.ipv4.tcp_slow_start_after_idle = 0
net.ipv4.tcp_synack_retries = 2
net.ipv4.tcp_syncookies = 1
net.ipv4.tcp_syn_retries = 2
net.ipv4.tcp_timestamps = 1
net.ipv4.tcp_tw_recycle = 0
net.ipv4.tcp_tw_reuse = 1
net.ipv4.tcp_wmem = 4096	65536	16777216
 
net.ipv6.conf.all.use_tempaddr = 0
net.ipv6.conf.default.use_tempaddr = 0
net.ipv6.conf.eth0.use_tempaddr = 0
net.ipv6.conf.eth1.use_tempaddr = 0
net.ipv6.conf.lo.use_tempaddr = 0
 
vm.mmap_min_addr = 65536
vm.swappiness = 1