redis配置详解(中英文)(14)

# Redis calls an internal function to perform many background tasks, like
# closing connections of clients in timeout, purging expired keys that are
# never requested, and so forth.
#
# Not all tasks are performed with the same frequency, but Redis checks for
# tasks to perform according to the specified "hz" value.
#
# By default "hz" is set to 10. Raising the value will use more CPU when
# Redis is idle, but at the same time will make Redis more responsive when
# there are many keys expiring at the same time, and timeouts may be
# handled with more precision.
#
# The range is between 1 and 500, however a value over 100 is usually not
# a good idea. Most users should use the default of 10 and raise this up to
# 100 only in environments where very low latency is required.
#
# Redis调用内部函数来执行许多后台任务,如关闭客户端超时的连接,清除未被请求过的过期Key等等。
#
# 不是所有的任务都以相同的频率执行,但Redis依照指定的“hz”值来执行检查任务。
#
# 默认情况下,“hz”的被设定为10。提高该值将在Redis空闲时使用更多的CPU时,但同时当有多个key
# 同时到期会使Redis的反应更灵敏,以及超时可以更精确地处理。
#
# 范围是1到500之间,但是值超过100通常不是一个好主意。
# 大多数用户应该使用10这个默认值,只有在非常低的延迟要求时有必要提高到100。
#
hz 10

# When a child rewrites the AOF file, if the following option is enabled
# the file will be fsync-ed every 32 MB of data generated. This is useful
# in order to commit the file to the disk more incrementally and avoid
# big latency spikes.
#
# 当一个子进程重写AOF文件时,如果启用下面的选项,则文件每生成32M数据会被同步。
# 为了增量式的写入硬盘并且避免大的延迟高峰这个指令是非常有用的
#
aof-rewrite-incremental-fsync yes

下面关于Redis的文章您也可能喜欢,不妨参考下:

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/7014cdb75c0f80fd240c5e6b9af887eb.html