OS: CentOS 7 Minimal

(0) open files

Q: Increased maximum number of open files to 10032 (it was originally set to 1024).
A:

$ulimit -a
$vi /etc/systemd/system/redis.service

In the "[Service]" unit, add the following:

LimitNOFILE=

(1) somaxconn
Q: WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.

A:
$vi /etc/sysctl.conf

net.core.somaxconn=

(2) overcommit_memory
Q: WARNING overcommit_memory is set to 0! Background save may fail under low memory condition.
To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1'
for this to take effect.

A:

$echo "vm.overcommit_memory=1" > /etc/sysctl.conf
$reboot
$ > /proc/sys/vm/overcommit_memory

(3) thp disable
Q: WARNING you have Transparent Huge Pages (THP) support enabled in your kernel.
This will create latency and memory usage issues with Redis.
To fix this issue run the command 'echo never > /sys/kernel/mm/transparent_hugepage/enabled' as root,
and add it to your /etc/rc.local in order to retain the setting after a reboot.
Redis must be restarted after THP is disabled.

A:

reference: https://www.centos.org/forums/viewtopic.php?t=49428

$vi /etc/rc.d/rc.local

echo never > /sys/kernel/mm/transparent_hugepage/enabled
echo never > /sys/kernel/mm/transparent_hugepage/defrag

$chmod +x /etc/rc.d/rc.local

redis.log

:M  Sep ::36.921 # User requested shutdown...
:M  Sep ::36.921 * Saving the final RDB snapshot before exiting.
:M  Sep ::36.927 * DB saved on disk
:M  Sep ::36.927 * Removing the pid file.
:M  Sep ::36.928 # Redis is now ready to exit, bye bye...
:C  Sep ::07.493 # systemd supervision requested, but NOTIFY_SOCKET not found
                _._
           _.-``__ ''-._
      _.-``    `.  `_.   (/)  bit
  .-`` .-```.  ```\/    _.,_ ''-._
 (    '      ,       .-`  | `,    )     Running in standalone mode
 |`-._`-...-` __...-.``-._|
 |    `-._   `._    /     _.-'    |     PID: 981
  `-._    `-._  `-./  _.-'    _.-'
 |`-._`-._    `-.__.-'    _.-'_.-'|
 |    `-._`-._        _.-'_.-'    |           http://redis.io
  `-._    `-._`-.__.-'_.-'    _.-'
 |`-._`-._    `-.__.-'    _.-'_.-'|
 |    `-._`-._        _.-'_.-'    |
  `-._    `-._`-.__.-'_.-'    _.-'
      `-._    `-.__.-'    _.-'
          `-._        _.-'
              `-.__.-'                                               

:M  Sep ::
:M  Sep ::07.545 # WARNING you have Transparent Huge Pages (THP) support enabled in your kernel. This will create latency and memory usage issues with Redis. To fix this issue run the command 'echo never > /sys/kernel/mm/transparent_hugepage/enabled' as root, and add it to your /etc/rc.local in order to retain the setting after a reboot. Redis must be restarted after THP is disabled.
:M  Sep ::07.550 * DB loaded from disk: 0.005 seconds
:M  Sep ::
:M  Sep ::47.949 # User requested shutdown...
:M  Sep ::47.949 * Saving the final RDB snapshot before exiting.
:M  Sep ::47.964 * DB saved on disk
:M  Sep ::47.964 * Removing the pid file.
:M  Sep ::47.965 # Redis is now ready to exit, bye bye...
:C  Sep ::18.272 # systemd supervision requested, but NOTIFY_SOCKET not found
                _._
           _.-``__ ''-._
      _.-``    `.  `_.   (/)  bit
  .-`` .-```.  ```\/    _.,_ ''-._
 (    '      ,       .-`  | `,    )     Running in standalone mode
 |`-._`-...-` __...-.``-._|
 |    `-._   `._    /     _.-'    |     PID: 978
  `-._    `-._  `-./  _.-'    _.-'
 |`-._`-._    `-.__.-'    _.-'_.-'|
 |    `-._`-._        _.-'_.-'    |           http://redis.io
  `-._    `-._`-.__.-'_.-'    _.-'
 |`-._`-._    `-.__.-'    _.-'_.-'|
 |    `-._`-._        _.-'_.-'    |
  `-._    `-._`-.__.-'_.-'    _.-'
      `-._    `-.__.-'    _.-'
          `-._        _.-'
              `-.__.-'                                               

:M  Sep ::
:M  Sep ::18.361 * DB loaded from disk: 0.007 seconds
:M  Sep ::

/var/log/redis.log

Redis Server installation FAQs的更多相关文章

  1. How to install redis server on CentOS 7 / RHEL 7

    在本教程中,我们将学习如何在CentOS 7 / RHEL 7上安装Redis服务器. redis的缩写是REmote DIctionary Server. 它是最流行的开源,高级键值缓存和存储之一. ...

  2. C# Redis Server分布式缓存编程 --网络转载

    这篇文章我将介绍如果用最简洁的方式配置Redis Server, 以及如何使用C#和它交互编程 一. 背景介绍 Redis是最快的key-value分布式缓存之一 缺点: 没有本地数据缓冲, 目前还没 ...

  3. 本地计算机 上的 Redis Server 服务启动后停止

    服务器上Redis服务安装正常..却启动不了.. 报错  :   本地计算机 上的 Redis Server 服务启动后停止.某些服务在未由其他服务或程序使用时将自动停止. 最后发现是Redis的配置 ...

  4. windows redis:Uncaught exception 'RedisException' with message 'Redis server went away'

    window-exe-redis-2.8.12服务,当你复制好php_igbinary.dll,php_redis.dll时候,你运行redis报错:Fatal error: Uncaught exc ...

  5. 虚拟机centOS中安装Redis,主机Redis Destop Manager不能访问虚拟机Redis server的解决方案

    今天在学些redis的时候碰到个问题,发现主机Redis Destop Manager不能访问虚拟机Redis server的解决方案,找了一些网上的资料,原因可能有两个,整理记录下来: 1. Red ...

  6. redis客户端连接服务端the version of redis server is too low to support this function错误

    redis作为一个内存数据库,使用得当可以大大的提升系统运行的效率,据说能读的速度是110000次/s,写的速度是81000次/s,我们的其中一个系统就用到了这个. 由于之前负责这个的同事离职,只好临 ...

  7. mac上配置mysql与redis server,并结合Pydev准备某爬虫环境

    mysql下安装mysql server mysql下安装redis server:https://www.jianshu.com/p/3bdfda703552 mac下安装配置redis:https ...

  8. Redis server went away的解决方案

    Redis server went away出现的问题如下: 1.看redis服务是否启动,包括端口 2.看是否是服务器端的防火墙引起的,iptables和selinux 3.看是否是redis.co ...

  9. redis error It was not possible to connect to the redis server(s); to create a disconnected multiplexer, disable AbortOnConnectFail. SocketFailure on PING

    应用redis出现如下错误 It was not possible to connect to the redis server(s); to create a disconnected multip ...

随机推荐

  1. Firedac 数据连接池的应用

    procedure TForm2.Button1Click(Sender: TObject); begin if not FDConnection1.Connected then FDConnecti ...

  2. java 多线程详解

    一.重点 重点: 1.创建和启动线程 2.实现线程调度 3.实现线程同步 4.实现线程通信 1.为什么要学习多线程? 当多个人访问电脑上同一资源的时候,要用到多线程,让每个人感觉很多电脑同时为多个人服 ...

  3. elasticsearch _script 脚本排序

    具体脚本语法请自行搜索“Groovy”语法. { "from" : 0, "size" : 5, "query" : { "boo ...

  4. Python3中Urllib库基本使用

    什么是Urllib? Python内置的HTTP请求库 urllib.request          请求模块 urllib.error              异常处理模块 urllib.par ...

  5. spring cloud-前端跨域问题的解决方案

    当我们需要将spring boot以restful接口的方式对外提供服务的时候,如果此时架构是前后端分离的,那么就会涉及到跨域的问题,那怎么来解决跨域的问题了,下面就来探讨下这个问题. 解决方案一: ...

  6. C/C++基础----重载运算与类型转换

    非成员版本 data1 + data2: operator+(data1, data2); 成员版本 data1 += data2: data1.operator+=(data2); 不建议的重载 逻 ...

  7. nginx关闭全局access.log,error.log

    如果nginx的server里没配置access.log,nginx会默认将server的访问日志记录到access.log, 关闭方法: 在nginx.conf配置文件中, 在全局配置中添加 err ...

  8. uoj#274. 【清华集训2016】温暖会指引我们前行

    http://uoj.ac/problem/274 由于边权互不相同,只需用lct维护带加边的最大生成树 #include<bits/stdc++.h> #define lc ch][0 ...

  9. P1706 全排列问题

    题解:(其实我认为它就是个循环) #include<iostream> #include<cstdio> #include<iomanip> using names ...

  10. PAT 乙级 1063 计算谱半径(20) C++版

    1063. 计算谱半径(20) 时间限制 200 ms 内存限制 65536 kB 代码长度限制 8000 B 判题程序 Standard 作者 CHEN, Yue 在数学中,矩阵的“谱半径”是指其特 ...