redis - 服务器负载变高
天蓬老师
天蓬老师 2017-04-22 08:56:19
0
2
705

我们的服务器在黑色星期五的这几天偶尔会出现负载突然变高(高达20+)的情况,现在已知redis在dump时会引起io wait,redis以及memcached连接数突增,之后memcached会出现超时,再接着数据库就挂掉,负载又上了新的台阶,感觉和redis有关系,有人知道redis的dump为什么有这么大的影响吗?

天蓬老师
天蓬老师

欢迎选择我的课程,让我们一起见证您的进步~~

reply all(2)
黄舟

When dumping data, a large number of disk IO operations and IO are busy, resulting in a relatively high io_wait, which may cause the load to become higher. I guess when your server load is high, the CPU should not be busy at this time, right? If the CPU is idle and IO is busy, it is probably caused by a large amount of IO caused by the dump operation of redis. You can try to optimize the dump-related configuration of redis and try to reduce the dump time interval

黄舟

High server load is nothing more than insufficient use of a certain resource. CPU resources, disk resources, network resources.

Redis’ dump must have IO operations. Just look at disk read and write.

Since I don’t know the detailed deployment of the original poster, is redis native? Mysql is also native? I feel that mysql is generally not placed on business machines. If it is a high IO load, it should not affect mysql on other machines.

If the number of connections suddenly increases and times out, you can check the number of tcp time_wait. I feel that this is more likely. It is more like a short connection call of a certain service. Once a fault occurs, a large number of time_waits are actively disconnected and network resources are exhausted, causing other services to be unavailable.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template