minio来⾃官⽅的内核优化参数内容来⾃github,还是⽐较有意义的
参考
#!/bin/bash
cat > f <<EOF
# maximum number of open files/file descriptors
fs.file-max = 4194303
# use as little swap space as possible
vm.swappiness = 1
# prioritize application RAM against disk/swap cache
vm.vfs_cache_pressure = 50
# minimum free memory
vm.min_free_kbytes = 1000000
# follow mellanox best practices llanox/s/article/linux-sysctl-tuning
# the following changes are recommended for improving IPv4 traffic performance by Mellanox
# disable the TCP timestamps option for better CPU utilization
p_timestamps = 0
# enable the TCP selective acks option for better throughput
p_sack = 1
# increase the maximum length of processor input queues
# increase the TCP maximum and default buffer sizes using setsockopt()
# increase memory thresholds to prevent packet dropping:
p_rmem = "4096 87380 4194304"
p_wmem = "4096 65536 4194304"
# enable low latency mode for TCP:
p_low_latency = 1
# the following variable is used to tell the kernel how much of the socket buffer
# space should be used for TCP window size, and how much to save for an application
# buffer. A value of 1 means the socket buffer will be divided evenly between.
# TCP windows size and application.
p_adv_win_scale = 1
# maximum number of incoming connections
# maximum number of packets queued
# queue length of completely established sockets waiting for accept
p_max_syn_backlog = 4096
# time to wait (seconds) for FIN packet
p_fin_timeout = 15
# disable icmp send redirects
f.all.send_redirects = 0
# disable icmp accept redirect
f.all.accept_redirects = 0
# drop packets with LSR or SSR
f.all.accept_source_route = 0
# MTU discovery, only enable when ICMP blackhole detected
p_mtu_probing = 1
EOF
echo "Enabling system level tuning params"
sysctl --quiet --f && rm -f
conf# `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 acle/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
参考资料

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。