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. 我发起了一个 .Net 平台上的 开源项目 知识图谱 Babana Map 和 文本文件搜索引擎 Babana Search

    起因 也是 前几天 有 网友 在 群 里发了   知识图谱   相关的文章, 还有 有 网友 问起   NLog -> LogStash -> Elastic Search  的 问题, ...

  2. centos7编译安装php7.2

    去官网下载php7.2安装包,选择一个结点下载:http://php.net/downloads.php 下载:wget -ivh http://cn.php.net/distributions/ph ...

  3. Hystrix 常用属性配置

    配置参数 默认值 说明 命令-执行属性配置 hystrix.command.default.execution.isolation.strategy THREAD 配置隔离策略,有效值 THREAD, ...

  4. Digispark红外接收器

    一.红外协议之NEC协议原理 NEC协议格式: 首次发送的是9ms的高电平脉冲,其后是4.5ms的低电平,接下来就是8bit的地址码(从低有效位开始发),而后是8bit的地址码的反码(主要是用于校验是 ...

  5. ES Route

    在ElaticSearch里面,路由功能算是一个高级用法,大多数时候我们用的都是系统默认的路由功能,一个es索引可以分多个shard和每个shard又可以有多个replia,默认情况下,elastic ...

  6. Azure 认知服务 (1) 概述

    <Windows Azure Platform 系列文章目录> 在笔者之前的文章中,介绍的都是Azure  Infrastructure-as-a-Service (IaaS) 和Plat ...

  7. ALGO-18_蓝桥杯_算法训练_单词接龙(搜索)

    问题描述 单词接龙是一个与我们经常玩的成语接龙相类似的游戏,现在我们已知一组单词,且给定一个开头的字母,要求出以这个字母开头的最长的“龙”(每个单词都最多在“龙”中出现两次),在两个单词相连时,其重合 ...

  8. pandas 读mysql数据库(整个表或者表的指定列)

    问题1:如何从数据库中读取整个表数据到DataFrame中? 首先,来看很容易想到的的办法 def read_table_by_name(self, table_name): "" ...

  9. vue-router2.0

    在使用vue.js创建单页运用的时候,我们通常的做法是配合vue-router一起使用,通过vue-router将组建映射到路由并进行渲染. 例如我们要实现两个页面的切换跳转,就需要使用路由,这里不再 ...

  10. 客户端负载均衡Feign之一:申明式服务调用Feign入门示例

    Spring Cloud提供了Ribbon和Feign作为客户端的负载均衡. 前面使用了Ribbon做客户端负载均衡,使用Hystrix做容错保护,这两者被作为基础工具类框架被广泛地应用在各个微服务的 ...