# Redis configuration file example
# redis配置文件模板

# Note on units: when memory size is needed, it is possible to specify
# it in the usual form of 1k 5GB 4M and so forth:
# 参数单位使用须知:在需要对内存大小进行配置时,其通常可能以1k 5GB 4M等类似的形式进行指定
#
# 1k => 1000 bytes
# 1kb => 1024 bytes
# 1m => 1000000 bytes
# 1mb => 1024*1024 bytes
# 1g => 1000000000 bytes
# 1gb => 1024*1024*1024 bytes
#
# units are case insensitive so 1GB 1Gb 1gB are all the same.
# 对内存大小进行配置时,其单位不区分大小写,例如1Gb 1GB 1gB所代表的都是相同的大小

################################## INCLUDES ###################################

# Include one or more other config files here. This is useful if you
# have a standard template that goes to all Redis server but also need
# to customize a few per-server settings. Include files can include
# other files, so use this wisely.
# 此处用于包含一个或者多个配置文件。假如你在配置多个Redis时,绝大多数的配置相同,但每个
# Redis的配置还是有个体差异,这时你就适合使用include标签;通过把相同的配置定义成一个外
# 部公共模板,用include标签进行引入,以此来降低配置难度
#
# Notice option "include" won't be rewritten by command "CONFIG REWRITE"
# from admin or Redis Sentinel. Since Redis always uses the last processed
# line as value of a configuration directive, you'd better put includes
# at the beginning of this file to avoid overwriting config change at runtime.
# 请注意,对于同一个配置项,Redis总是选择最后一行的配置生效;因此,如果你希望配置文件的
# 优先级高于模板文件,那么请在配置文件的第一行使用include
#
# If instead you are interested in using includes to override configuration
# options, it is better to use include as the last line.
# 反之,如果你希望模板配置的优先级更高,那么就在配置文件的最后一行使用include
#
# include /path/to/local.conf
# include /path/to/other.conf

################################ GENERAL #####################################

# By default Redis does not run as a daemon. Use 'yes' if you need it.
# Note that Redis will write a pid file in /var/run/redis.pid when daemonized.
# Redis默认为非后台运行。当daemonize值为yes时,Redis将会在后台运行,其进程信息将会写入
# /var/run/redis.pid文件中;当daemonize值为no时,Redis将不采用后台运行
daemonize yes

# When running daemonized, Redis writes a pid file in /var/run/redis.pid by
# default. You can specify a custom pid file location here.
# 当redis以后台程序形式运行时,redis的进程id会默认写入到/var/run/redis.pid文件张宏;在
# 此处你可以自定义需要进程id写入的文件及其路径
pidfile /var/run/redis.pid

# Accept connections on the specified port, default is 6379.
# If port 0 is specified Redis will not listen on a TCP socket.
# 此处定义连接端口,默认为6379;如果端口为0,那么Redis不会监听对应的TCP连接
port 6379

# TCP listen() backlog.
# TCP连接缓冲池
#
# In high requests-per-second environments you need an high backlog in order
# to avoid slow clients connections issues. Note that the Linux kernel
# will silently truncate it to the value of /proc/sys/net/core/somaxconn so
# make sure to raise both the value of somaxconn and tcp_max_syn_backlog
# in order to get the desired effect.
# 在高并发环境下,需要通过缓冲池来防止出现客户端连接缓慢的问题。需要注意的是,Linux的内
# 核会通过/proc/sys/net/core/somaxconn和tcp_max_syn_backlog来影响到缓冲池的具体效果。
# 因此为了获得理想的效果,请提高somaxconn和tcp_max_syn_backlog的值
tcp-backlog 511

# By default Redis listens for connections from all the network interfaces
# available on the server. It is possible to listen to just one or multiple
# interfaces using the "bind" configuration directive, followed by one or
# more IP addresses.
# 默认情况下,Redis监听来自服务器所有可行接口的连接;可以通过bind标签使Redis只监听一个
# 或多个指定的IP地址;bind标签后可接一个或多个IP地址
#
# Examples:
#
# bind 192.168.1.100 10.0.0.1
# bind 127.0.0.1

# Specify the path for the Unix socket that will be used to listen for
# incoming connections. There is no default, so Redis will not listen
# on a unix socket when not specified.
# unixsocker的路径指向的文件用于定义监听的连接;此设置项没有默认值,因此在没有定义的情
# 况下,redis会默认监听所有
#
# unixsocket /tmp/redis.sock
# unixsocketperm 755

# Close the connection after a client is idle for N seconds (0 to disable)
# 当一个客户端已经断开n秒后,自动断开该连接(超时机制)
timeout 0

# TCP keepalive.
# TCP长连接
#
# If non-zero, use SO_KEEPALIVE to send TCP ACKs to clients in absence
# of communication. This is useful for two reasons:
# 如果该配置值非零,则在不存在通信的情况下使用SO_KEEPALIVE向客户端发送TCP ACKs,原因
# 如下:
#
# 1) Detect dead peers.
# 检测连接是否死亡
# 2) Take the connection alive from the point of view of network
# equipment in the middle.
# 通过中间网络设备的角度,使该连接长期处于存活状态
#
# On Linux, the specified value (in seconds) is the period used to send ACKs.
# Note that to close the connection the double of the time is needed.
# On other kernels the period depends on the kernel configuration.
# 在Linux中,通过指定的值(通常以秒为单位)定期向客户端发送ACKs,类似于心跳检测;需要注意
# 的是,如果要关闭连接则需要消耗该值的两倍的时间;在其他的内核上具体的单位以内核配置为准
#
# A reasonable value for this option is 60 seconds.
# 建议值为60
tcp-keepalive 0

# Specify the server verbosity level.
# 指定服务日志级别
# This can be one of:
# 可以有以下取值:
# debug (a lot of information, useful for development/testing)
# debug(通常用于开发/测试)
# verbose (many rarely useful info, but not a mess like the debug level)
# verbose(简化debug级别的日志信息,包含少量有用信息)
# notice (moderately verbose, what you want in production probably)
# notice(通常用于生产环境)
# warning (only very important / critical messages are logged)
# warning(只记录重要的警告信息)
# 日志级别
loglevel notice

# Specify the log file name. Also the empty string can be used to force
# Redis to log on the standard output. Note that if you use standard
# output for logging but daemonize, logs will be sent to /dev/null
# 指定日志文件路径和名称;当为空字符串时,Redis将以默认地址进行输出;注意:如果使用标准
# 输出且以后台进程形式运行,默认输出到/dev/null
logfile ""

# To enable logging to the system logger, just set 'syslog-enabled' to yes,
# and optionally update the other syslog parameters to suit your needs.
# syslog-enabled为yes时,日志将被写入到系统日志中;同时可以根据自己的需要有选择性的更新
# 其他的syslog参数
# syslog-enabled no

# Specify the syslog identity.
# 指定日志在系统日志中的标识
# syslog-ident redis

# Specify the syslog facility. Must be USER or between LOCAL0-LOCAL7.
# 指定系统日志的设备;必须为某个用户,或者介于LOCAL0-LOCAL17
# syslog-facility local0

# Set the number of databases. The default database is DB 0, you can select
# a different one on a per-connection basis using SELECT <dbid> where
# dbid is a number between 0 and 'databases'-1
# 设置Redis数据库的数量;默认使用第0个Redis数据库,你可以在连接中使用SELECT <dbid>来
# 指定每一个连接究竟使用哪一个数据库
databases 16

Redis配置文件 redis.conf 解读(一)的更多相关文章

  1. redis配置文件redis.conf参数说明

    redis配置文件redis.conf参数说明 (2013-01-09 21:20:40)转载▼ 标签: redis配置 redis.conf 配置说明 杂谈 分类: nosql # By defau ...

  2. Redis 配置文件 redis.conf 项目详解

    Redis.conf 配置文件详解 # [Redis](http://yijiebuyi.com/category/redis.html) 配置文件 # 当配置中需要配置内存大小时,可以使用 1k, ...

  3. Redis 配置文件 Redis.conf 参数说明

    Redis 配置文件 Redis.conf 参数说明 参数名 参数说明 参数实例 daemonize 是否以后台守护进程运行,默认为 no, 取值 yes, no   daemonize no     ...

  4. Redis配置文件redis.conf详解

    一.Redis配置文件redis.conf详解 # Note on units: when memory size is needed, it is possible to specifiy # it ...

  5. redis配置文件redis.conf翻译、解释以及常用注意事项(持续更新中...)

    # Redis configuration file example. #Redis 配置文件的示例 #如何利用配置文件启动Redis # Note that in order to read the ...

  6. [转]redis配置文件redis.conf的详细说明

    转自: http://www.sufeinet.com/thread-8047-1-1.html # Redis 配置文件 # 当配置中需要配置内存大小时,可以使用 1k, 5GB, 4M 等类似的格 ...

  7. [redis] redis配置文件redis.conf的详细说明

    # Redis 配置文件 # 当配置中需要配置内存大小时,可以使用 1k, 5GB, 4M 等类似的格式,其转换方式如下(不区分大小写) # # 1k => bytes # 1kb => ...

  8. redis配置文件redis.conf中文版

    转账自:http://www.jb51.net/article/50605.htm # Redis示例配置文件 # 注意单位问题:当需要设置内存大小的时候,可以使用类似1k.5GB.4M这样的常见格式 ...

  9. redis配置文件redis.conf说明

    redis.conf 配置项说明如下:1. Redis默认不是以守护进程的方式运行,可以通过该配置项修改,使用yes启用守护进程    daemonize no2. 当Redis以守护进程方式运行时, ...

随机推荐

  1. 谷歌技术"三宝"之GFS

    题记:初学分布式文件系统,写篇博客加深点印象.GFS的特点是使用一堆廉价的商用计算机支撑大规模数据处理. 虽然"The Google File System " 是03年发表的老文 ...

  2. spring mvc 的上传图片是怎么实现的?

    spring mvc 的上传图片是怎么实现的? 导入jar包,commons-io.jar 及 commons-fileupload.jar 在springmvc的配置文件中配置Mutipart解析器 ...

  3. 最短路径之Bellman-Ford算法的队列优化及邻接表

    参考链接:https://blog.csdn.net/qq_40626497/article/details/81139344

  4. GIT 私有仓库 github项目提交失败 master -> master (non-fast-forward)

    https://blog.csdn.net/fightingforcv/article/details/52073182 https://blog.csdn.net/u014135752/articl ...

  5. 线性回归(linear regression)

    基本形式 最小二乘法估计拟合参数 最小二乘法:基于均方误差最小化来进行模型求解的方法称为“最小二乘法”(least square method) 即(左边代表 $\mathbf{\omega }$ 和 ...

  6. CSS布局学习(二) - flex属性

    flex属性 定义 flex布局包括最外层的容器和内部的元素,flex属性是内部元素属性.flex属性是flex-grow, flex-shrink, flex-basis三个属性的简写 flex-g ...

  7. 【八】jqeury之click事件[添加及删除数据]

    要求:1.添加数据显示在下方列表.2.添加的数据可动态删除. 界面显示: 代码: <!DOCTYPE html> <html> <head> <script ...

  8. DP爬台阶问题

    1. 初级爬台阶 - 求最短步数 LC - 70 一次可以迈1-2个台阶,因此最短步数与前两个台阶有关. Initial state: 第一阶:1步 : 第二阶:1步 deduction functi ...

  9. Android测试(一)——Apk文件结构以及Android组件介绍

    APK文件结构: assests目录:一般存放的是不会被编译处理的文件,一般是资源性质的文件或者配置文件: libs目录:程序依赖的native库,包含针对特定处理器软件层的编译代码: res目录:存 ...

  10. Vue 学习Day001

    入门 基本使用 安装Vue 直接引入本地或者cdn Vue地址 使用npm 使用cli 示例 <!DOCTYPE html> <html lang="en"> ...