2024年4月17日发(作者:)
# buffer. A value of 1 means the socket buffer will be divided evenly between.
# TCP windows size and application.
_adv_win_scale = 1
# maximum number of incoming connections
onn = 65535
# maximum number of packets queued
_max_backlog = 10000
# queue length of completely established sockets waiting for accept
_max_syn_backlog = 4096
# time to wait (seconds) for FIN packet
_fin_timeout = 15
# disable icmp send redirects
_redirects = 0
# disable icmp accept redirect
_redirects = 0
# drop packets with LSR or SSR
_source_route = 0
# MTU discovery, only enable when ICMP blackhole detected
_mtu_probing = 1
EOF
echo "Enabling system level tuning params"
sysctl --quiet --load && rm -f
# `Transparent Hugepage Support`*: This is a Linux kernel feature intended to improve
# performance by making more efficient use of processor’s memory-mapping hardware.
# But this may cause /linux/performance-issues-with-transparent-huge-pages-thp
# for non-optimized applications. As most Linux distributions set it to `enabled=always` by default,
# we recommend changing this to `enabled=madvise`. This will allow applications optimized
# for transparent hugepages to obtain the performance benefits, while preventing the
# associated problems otherwise. Also, set `transparent_hugepage=madvise` on your kernel
# command line (e.g. in /etc/default/grub) to persistently set this value.
echo "Enabling THP madvise"
echo madvise | sudo tee /sys/kernel/mm/transparent_hugepage/enabled
参考资料
发布评论