Linux kernel tuning for network performance – sysctl tuning

net.ipv4.ip_nonlocal_bind = 1
net.ipv4.tcp_rmem = 4096 87380 6291456
net.ipv4.tcp_max_tw_buckets = 3240000
net.ipv4.tcp_tw_recycle = 0
net.ipv4.tcp_tw_reuse = 1
net.ipv4.tcp_syncookies = 1
net.ipv4.tcp_fin_timeout = 15
net.ipv4.ip_local_port_range = 1024 65535
net.ipv4.tcp_max_syn_backlog = 3240000
net.core.somaxconn = 3240000
net.core.netdev_max_backlog = 3240000
fs.file-max = 1048576
fs.inotify.max_queued_events=1048576
fs.inotify.max_user_instances=1048576
fs.inotify.max_user_watches=1048576
vm.max_map_count=524288
kernel.dmesg_restrict=0
kernel.keys.maxkeys=2000
net.ipv4.neigh.default.gc_thresh1=4096
net.ipv4.neigh.default.gc_thresh2=8192
net.ipv4.neigh.default.gc_thresh3=16384
net.ipv6.neigh.default.gc_thresh1=4096
net.ipv6.neigh.default.gc_thresh2=8192
net.ipv6.neigh.default.gc_thresh3=16384
net.ipv4.tcp_keepalive_time=90
net.ipv4.tcp_keepalive_intvl=10
net.ipv4.tcp_keepalive_probes=3
net.ipv4.tcp_fastopen=3
net.core.rmem_default=1048576
net.core.rmem_max=16777216
net.core.wmem_default=1048576
net.core.wmem_max=16777216
net.core.optmem_max=25165824
net.ipv4.tcp_slow_start_after_idle=0
net.ipv4.tcp_mem=1048576 3145728 8388608
net.ipv4.udp_mem=65536 131072 262144
net.ipv4.udp_rmem_min=16384
net.ipv4.tcp_wmem=4096 65536 16777216
net.ipv4.udp_wmem_min=16384
net.core.default_qdisc=fq
net.ipv4.tcp_congestion_control=bbr
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1

Leave a Reply

Your email address will not be published. Required fields are marked *