vi /etc/redis/redis.conf
maxclients 65000
tcp-backlog 65536
timeout 120
tcp-keepalive 60
vi /etc/security/limits.conf
* soft nofile 65536
* hard nofile 65536
vi /etc/sysctl.conf
vm.overcommit_memory = 1
vm.swappiness = 0
net.core.somaxconn = 60000
net.ipv4.tcp_window_scaling = 1
net.ipv4.tcp_congestion_control = cubic
net.ipv4.tcp_syncookies = 1
net.ipv4.tcp_max_syn_backlog = 4096
sysctl vm.overcommit_memory=1
sudo sysctl -a | grep file-max
sysctl -w fs.file-max=810000
vi /etc/sysctl.conf
fs.file-max = 810000
sysctl -p
the two /etc/pam.d/common-session* contain a `session required pam_limits.so`
sudo su
echo '3' > /sys/class/net/eth0/queues/rx-0/rps_cpus
echo 'never' > /sys/kernel/mm/transparent_hugepage/enabled
redis-server /etc/redis/redis.conf
阅读(1464) | 评论(0) | 转发(0) |