Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/linux/23.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/xamarin/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Linux 如何为高负载优化Redis服务器?_Linux_Redis_Debian_High Load - Fatal编程技术网

Linux 如何为高负载优化Redis服务器?

Linux 如何为高负载优化Redis服务器?,linux,redis,debian,high-load,Linux,Redis,Debian,High Load,服务器:Intel®Core™ i7-3930K 6核、64 GB DDR3 RAM、2 x 3 TB 6 GB/s硬盘驱动器SATA3 操作系统(uname-a):Linux***3.2.0-4-amd64#1 SMP Debian 3.2.65-1+deb7u1 x8664GNU/Linux Redis服务器2.8.19 在服务器上旋转Redis服务器,其任务是服务来自两个PHP服务器的请求。 问题:服务器无法应付峰值负载,并停止处理传入请求或使其速度非常慢 尝试优化我制作的服务器: cat

服务器:
Intel®Core™ i7-3930K 6核、64 GB DDR3 RAM、2 x 3 TB 6 GB/s硬盘驱动器SATA3

操作系统(uname-a):
Linux***3.2.0-4-amd64#1 SMP Debian 3.2.65-1+deb7u1 x8664GNU/Linux
Redis服务器2.8.19

在服务器上旋转Redis服务器,其任务是服务来自两个PHP服务器的请求。 问题:服务器无法应付峰值负载,并停止处理传入请求或使其速度非常慢

尝试优化我制作的服务器:

cat /etc/rc.local
echo never > /sys/kernel/mm/transparent_hugepage/enabled
ulimit -SHn 100032
echo 1 > /proc/sys/net/ipv4/tcp_tw_reuse

cat /etc/sysctl.conf
vm.overcommit_memory=1
net.ipv4.tcp_max_syn_backlog=65536
net.core.somaxconn=32768
fs.file-max=200000
net.ipv4.tcp_tw_reuse = 1
net.ipv4.tcp_tw_recycle = 1

cat /etc/redis/redis.conf
tcp-backlog 32768
maxclients 100000
我在博客中的redis.io上找到了什么设置

测验

客户数量的增加降低了查询性能,最糟糕的是,Redis server停止处理传入请求,而PHP中的服务器存在几十种类型的异常

Uncaught exception 'RedisException' with message 'Connection closed' in [no active file]:0\n
Stack trace:\n
#0 {main}\n  thrown in [no active file] on line 0
怎么办?还有什么需要优化的?这样的机器如何吸引客户

谢谢大家!

Uncaught exception 'RedisException' with message 'Connection closed' in [no active file]:0\n
Stack trace:\n
#0 {main}\n  thrown in [no active file] on line 0