2018-01-23 14:36:53 +00:00
|
|
|
# local sysctl settings can be stored in this directory
|
|
|
|
# max open files
|
2018-06-08 19:24:00 +00:00
|
|
|
fs.file-max = 512000
|
2018-01-23 14:36:53 +00:00
|
|
|
# max read buffer
|
2023-01-25 19:31:39 +00:00
|
|
|
net.core.rmem_max = 16777216
|
2018-01-23 14:36:53 +00:00
|
|
|
# max write buffer
|
2023-01-25 19:31:39 +00:00
|
|
|
net.core.wmem_max = 16777216
|
2020-05-14 19:15:12 +00:00
|
|
|
net.core.optmem_max = 33554432
|
2018-01-23 14:36:53 +00:00
|
|
|
# default read buffer
|
2023-01-25 19:31:39 +00:00
|
|
|
#net.core.rmem_default = 16777216
|
2018-01-23 14:36:53 +00:00
|
|
|
# default write buffer
|
2023-01-25 19:31:39 +00:00
|
|
|
#net.core.wmem_default = 16777216
|
2018-01-23 14:36:53 +00:00
|
|
|
# max processor input queue
|
2023-01-25 19:31:39 +00:00
|
|
|
net.core.netdev_max_backlog = 8192
|
2018-01-23 14:36:53 +00:00
|
|
|
# max backlog
|
2023-01-25 19:31:39 +00:00
|
|
|
net.core.somaxconn = 8192
|
2018-01-23 14:36:53 +00:00
|
|
|
|
|
|
|
# resist SYN flood attacks
|
|
|
|
net.ipv4.tcp_syncookies = 1
|
|
|
|
# reuse timewait sockets when safe
|
|
|
|
net.ipv4.tcp_tw_reuse = 1
|
|
|
|
# turn off fast timewait sockets recycling
|
2019-05-12 07:01:58 +00:00
|
|
|
#net.ipv4.tcp_tw_recycle = 0
|
2018-01-23 14:36:53 +00:00
|
|
|
# short FIN timeout
|
2019-05-12 07:01:58 +00:00
|
|
|
#net.ipv4.tcp_fin_timeout = 60
|
2021-06-09 16:22:27 +00:00
|
|
|
# increase max orphans
|
|
|
|
net.ipv4.tcp_max_orphans = 16384
|
2018-01-23 14:36:53 +00:00
|
|
|
# short keepalive time
|
2018-06-14 20:39:42 +00:00
|
|
|
#net.ipv4.tcp_keepalive_time = 2400
|
2018-01-23 14:36:53 +00:00
|
|
|
# outbound port range
|
2018-06-27 18:02:48 +00:00
|
|
|
net.ipv4.ip_local_port_range = 9999 65000
|
2018-01-23 14:36:53 +00:00
|
|
|
# max SYN backlog
|
2018-10-16 09:02:53 +00:00
|
|
|
net.ipv4.tcp_max_syn_backlog = 10240
|
2018-01-23 14:36:53 +00:00
|
|
|
# max timewait sockets held by system simultaneously
|
|
|
|
net.ipv4.tcp_max_tw_buckets = 10000
|
|
|
|
# turn on TCP Fast Open on both client and server side
|
2019-01-17 19:43:53 +00:00
|
|
|
#net.ipv4.tcp_fastopen = 3
|
2018-01-23 14:36:53 +00:00
|
|
|
# TCP receive buffer
|
2023-01-25 19:31:39 +00:00
|
|
|
net.ipv4.tcp_rmem = 4096 87380 16777216
|
2018-01-23 14:36:53 +00:00
|
|
|
# TCP write buffer
|
2023-01-25 19:31:39 +00:00
|
|
|
net.ipv4.tcp_wmem = 4096 87380 16777216
|
2018-06-27 18:02:48 +00:00
|
|
|
# TCP buffer
|
2023-01-25 19:31:39 +00:00
|
|
|
net.ipv4.tcp_mem = 8192000 8192000 8192000
|
2018-08-20 15:24:54 +00:00
|
|
|
# UDP buffer
|
2023-01-25 19:31:39 +00:00
|
|
|
net.ipv4.udp_mem = 4096 131072 67108864
|
2018-07-18 16:45:46 +00:00
|
|
|
# turn off path MTU discovery
|
|
|
|
net.ipv4.tcp_mtu_probing = 0
|
2018-01-23 14:36:53 +00:00
|
|
|
|
|
|
|
# for low-latency network, use cubic instead
|
|
|
|
# net.ipv4.tcp_congestion_control = balia
|
|
|
|
|
|
|
|
# Default conntrack is too small
|
2020-05-14 19:15:12 +00:00
|
|
|
net.netfilter.nf_conntrack_max = 131072
|
2019-08-28 18:59:52 +00:00
|
|
|
|
2021-09-24 19:08:57 +00:00
|
|
|
net.ipv4.tcp_ecn = 2
|
2020-05-14 19:15:12 +00:00
|
|
|
#net.ipv4.tcp_sack = 0
|
2023-01-25 19:31:39 +00:00
|
|
|
#net.ipv4.tcp_dsack = 0
|
|
|
|
#net.ipv4.tcp_fack = 0
|
|
|
|
net.ipv4.tcp_slow_start_after_idle = 0
|