tuk*_*tuk 2 linux debian redis
我正在建立一个Redis 3.2.6集群.在本博客中,提到更改"调整内核网络堆栈"的以下参数
vm.swappiness=0 # turn off swapping
net.ipv4.tcp_sack=1 # enable selective acknowledgements
net.ipv4.tcp_timestamps=1 # needed for selective acknowledgements
net.ipv4.tcp_window_scaling=1 # scale the network window
net.ipv4.tcp_congestion_control=cubic # better congestion algorythm
net.ipv4.tcp_syncookies=1 # enable syn cookied
net.ipv4.tcp_tw_recycle=1 # recycle sockets quickly
net.ipv4.tcp_max_syn_backlog=NUMBER # backlog setting
net.core.somaxconn=NUMBER # up the number of connections per port
net.core.rmem_max=NUMBER # up the receive buffer size
net.core.wmem_max=NUMBER # up the buffer size for all connections
Run Code Online (Sandbox Code Playgroud)
有人可以解释一下上面的参数如何影响redis的行为?
除了上面提到的那些之外,我还需要查看一些其他参数来准备用于redis安装的操作系统吗?
环境
大多数标志似乎与优化非常频繁的TCP连接和TCP连接的延迟有关.在某些情况下,他们可能会有所帮助,但Redis客户端和服务器已经做了最重要的事情,即禁用Nagle的算法.然而,为Redis设置Linux内核的最重要的事情实际上是:
如果上述设置不正确,最新版本的Redis会发出警告.
| 归档时间: |
|
| 查看次数: |
403 次 |
| 最近记录: |