1. # By default Redis asynchronously dumps the dataset on disk. This mode is
  2. # good enough in many applications, but an issue with the Redis process or
  3. # a power outage may result into a few minutes of writes lost (depending on
  4. # the configured save points).
  5. #
  6. # The Append Only File is an alternative persistence mode that provides
  7. # much better durability. For instance using the default data fsync policy
  8. # (see later in the config file) Redis can lose just one second of writes in a
  9. # dramatic event like a server power outage, or a single write if something
  10. # wrong with the Redis process itself happens, but the operating system is
  11. # still running correctly.
  12. #
  13. # AOF and RDB persistence can be enabled at the same time without problems.
  14. # If the AOF is enabled on startup Redis will load the AOF, that is the file
  15. # with the better durability guarantees.
  16. #
  17. # Please check http://redis.io/topics/persistence for more information.
  18. appendonly no
  19. # The name of the append only file (default: "appendonly.aof")
  20. # appendfilename appendonly.aof
  21. # The fsync() call tells the Operating System to actually write data on disk
  22. # instead to wait for more data in the output buffer. Some OS will really flush
  23. # data on disk, some other OS will just try to do it ASAP.
  24. #
  25. # Redis supports three different modes:
  26. #
  27. # no: don't fsync, just let the OS flush the data when it wants. Faster.
  28. # always: fsync after every write to the append only log . Slow, Safest.
  29. # everysec: fsync only one time every second. Compromise.
  30. #
  31. # The default is "everysec", as that's usually the right compromise between
  32. # speed and data safety. It's up to you to understand if you can relax this to
  33. # "no" that will let the operating system flush the output buffer when
  34. # it wants, for better performances (but if you can live with the idea of
  35. # some data loss consider the default persistence mode that's snapshotting),
  36. # or on the contrary, use "always" that's very slow but a bit safer than
  37. # everysec.
  38. #
  39. # More details please check the following article:
  40. # http://antirez.com/post/redis-persistence-demystified.html
  41. #
  42. # If unsure, use "everysec".
  43. # appendfsync always
  44. appendfsync always
  45. # appendfsync no
  46. # When the AOF fsync policy is set to always or everysec, and a background
  47. # saving process (a background save or AOF log background rewriting) is
  48. # performing a lot of I/O against the disk, in some Linux configurations
  49. # Redis may block too long on the fsync() call. Note that there is no fix for
  50. # this currently, as even performing fsync in a different thread will block
  51. # our synchronous write(2) call.
  52. #
  53. # In order to mitigate this problem it's possible to use the following option
  54. # that will prevent fsync() from being called in the main process while a
  55. # BGSAVE or BGREWRITEAOF is in progress.
  56. #
  57. # This means that while another child is saving, the durability of Redis is
  58. # the same as "appendfsync none". In practical terms, this means that it is
  59. # possible to lose up to 30 seconds of log in the worst scenario (with the
  60. # default Linux settings).
  61. #
  62. # If you have latency problems turn this to "yes". Otherwise leave it as
  63. # "no" that is the safest pick from the point of view of durability.
  64. no-appendfsync-on-rewrite no
  65. # Automatic rewrite of the append only file.
  66. # Redis is able to automatically rewrite the log file implicitly calling
  67. # BGREWRITEAOF when the AOF log size grows by the specified percentage.
  68. #
  69. # This is how it works: Redis remembers the size of the AOF file after the
  70. # latest rewrite (if no rewrite has happened since the restart, the size of
  71. # the AOF at startup is used).
  72. #
  73. # This base size is compared to the current size. If the current size is
  74. # bigger than the specified percentage, the rewrite is triggered. Also
  75. # you need to specify a minimal size for the AOF file to be rewritten, this
  76. # is useful to avoid rewriting the AOF file even if the percentage increase
  77. # is reached but it is still pretty small.
  78. #
  79. # Specify a percentage of zero in order to disable the automatic AOF
  80. # rewrite feature.
  81. auto-aof-rewrite-percentage 100
  82. auto-aof-rewrite-min-size 64mb

译文:

    1. ############################## 仅追加方式 ###############################
    2. #默认情况下Redis会异步的将数据导出到磁盘上。这种模式对许多应用程序已经足够了,
    3. #但是如果断电或者redis进程出问题就会导致一段时间内的更新数据丢失(取决与配置项)
    4. #
    5. #这种只增文件是可选的能够提供更好的体验的数据持久化策略。
    6. #举个例子,如果使用默认的配置数据fsync策略,在服务器意外断电的情况下redis只会丢失一秒中内的更新数据,
    7. #或者当redis进程出问题但操作系统运转正常时,redis只会丢失一个数据更新操作。
    8. #
    9. #AOF 和 RDB 持久化方式可以同时启动并且无冲突。
    10. #如果AOF开启,启动redis时会加载aof文件,这些文件能够提供更好的保证。
    11. #请在 http://redis.io/topics/persistence 获取更多数据持久化信息。
    12. appendonly no
    13. # 只增文件的文件名称。(默认是appendonly.aof)
    14. # appendfilename appendonly.aof
    15. #调用fsync()函数会通知操作系统真正将数据写入磁盘,而不是等待缓冲区中有更多数据。
    16. #有些操作系统会将数据输出到磁盘,有些操作系统只是ASAP。
    17. #
    18. #redis支持三种不同的方式:
    19. #
    20. #no:不调用,之等待操作系统来清空缓冲区当操作系统要输出数据时。很快。
    21. # always: 每次更新数据都写入仅增日志文件。慢,但是最安全。
    22. # everysec: 每秒调用一次。折中。
    23. #
    24. #默认是每秒中一次,因为它往往是在速度和数据安全两者之间的折中选择。
    25. #如果你可以接受让操作系统去自动清空缓存,你可以将这项配置降低到'no'(如果你可以接受一段时间的数据丢失,默认的rdb就足够了),
    26. #这完全取决与你。如果你想要一个更好的体验或者从相反的角度,使用'always',这样会很慢,但是比'everysec'安全些。
    27. #
    28. #请在下面的文章中获取更多细节知识:
    29. #  http://antirez.com/post/redis-persistence-demystified.html
    30. #
    31. #如果你不是很清楚这三项之间的区别,或者不知道哪种适合你的机器,就是用默认吧。
    32. # appendfsync always
    33. appendfsync always
    34. # appendfsync no
    35. #当AOF策略设置为'always'或者'everysec'的时候,后台的保存进程会进行很多磁盘I/O操作,
    36. #在某些linux结构中redis会在调用sync()方法时阻塞很长时间。记住,现在还没办法解决这个问题,即使在不同进程中进行调用也会block。
    37. #
    38. #使用如下配置可能会缓解这个问题,这样会在存储大数据或者BIGREWRITEAOF的时候不会在主进程中调用fsync()方法。
    39. #
    40. # 这表示,如果另外一个子进程在进行保存操作,redis的表现如同配置为‘appendfsync no’。
    41. #在实际应用中,这表示在最坏的情景下(使用linux默认配置)可能会丢失30秒日志。
    42. #
    43. #如果你有特殊的情况可以配置为'yes'。但是配置为'no'是最为安全的选择。
    44. no-appendfsync-on-rewrite no
    45. #自动重写只增文件。
    46. #redis可以自动盲从的调用‘BGREWRITEAOF’来重写日志文件,如果日志文件增长了指定的百分比。
    47. #
    48. #它是这样工作的:每次rewrite后redis会记录日志文件的大小。(如果重启后没有重写后的大小,就默认用日志文件大小)
    49. #
    50. # 这个基准日志大小和当前日志大小做比较。如果当前大小比指定的百分比,重写机制就会被触发。
    51. #同时,你也要制定一个重写下线,用来避免增长百分比够了,但是日志文件还很小的情况。
    52. #
    53. #指定百分比为0可以注掉自动重写日志文件功能。
    54. auto-aof-rewrite-percentage 100
    55. auto-aof-rewrite-min-size 64mb

redis配置文件英译汉的更多相关文章

  1. python学习笔记:"爬虫+有道词典"实现一个简单的英译汉程序

    1.有道的翻译 网页:www.youdao.com Fig1 Fig2 Fig3 Fig4 再次点击"自动翻译"->选中'Network'->选中'第一项',如下: F ...

  2. Redis 配置文件详解

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

  3. Redis配置文件参数说明

    Redis配置文件参数说明   1. Redis默认不是以守护进程的方式运行,可以通过该配置项修改,使用yes启用守护进程 daemonize no 2. 当Redis以守护进程方式运行时,Redis ...

  4. redis配置文件参数说明及命令操作

    redis下载地址:https://github.com/MSOpenTech/redis/releases. Redis 的配置文件位于 Redis 安装目录下,文件名为redis.windows. ...

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

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

  6. redis配置文件

    # redis 配置文件示例 # 当你需要为某个配置项指定内存大小的时候,必须要带上单位, # 通常的格式就是 1k 5gb 4m 等酱紫: # # 1k => bytes # 1kb => ...

  7. redis配置文件中文解释

    # redis 配置文件示例 # 当你需要为某个配置项指定内存大小的时候,必须要带上单位, # 通常的格式就是 1k 5gb 4m 等酱紫: # # 1k => bytes # 1kb => ...

  8. redis 配置文件解读

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

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

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

随机推荐

  1. SpringMVC文件上传和下载

    上传与下载 1文件上传 1.1加入jar包 文件上传需要依赖的jar包 1.2配置部件解析器 解析二进制流数据. <?xml version="1.0" encoding=& ...

  2. IE8下导入EXCEL数据传到客户端以附件下载

    IE8下导入EXCEL数据传到客户端以附件下载方式出现,而不显示数据,解决方法:以text/html格式返回. HttpResponseMessage message = new HttpRespon ...

  3. ORA-12541:TNS:no listener 客户端tnsnames.ora配置,以及服务端listener.ora配置

    需求:客户端(192.168.25.1)需要访问服务端(192.168.7.215)的Oracle库ORCL. 步骤一:配置客户端tnsnames.ora 步骤二:配置服务端listener.ora ...

  4. 忘记Windows7登陆密码解决办法

    忘记 Windows7 的登陆密码,解决这个问题的思路就是替换 system32 下的 Magnify.exe . 可以从 WindowsPE 启动,到 C:\windows\system32 下. ...

  5. hive 复杂类型

    hive提供一种复合类型的数据 struct:可以使用"."来存取数据 map:可以使用键值对来存取数据 array:array中存取的数据为相同类型,其中的数据可以通过下表获取数 ...

  6. while 与do ..while区别

    package com.chongrui.test;/*while语句的一般形式如下:while(表达式)语句表达式为非0值,执行while中内嵌语句.它是先判断表达式,在根据表达式值,执行语句.do ...

  7. Java 8 新特性之泛型的类型推导

    1. 泛型究竟是什么? 在讨论类型推导(type inference)之前,必须回顾一下什么是泛型(Generic).泛型是Java SE 1.5的新特性,泛型的本质是参数化类型,也就是说所操作的数据 ...

  8. python enumerate用法

    含义:"枚举,列举" 对于一个可迭代的(iterable)/可遍历的对象(如列表.字符串),enumerate将其组成一个索引序列,利用它可以同时获得索引和值 enumerate多 ...

  9. Linux系统目录结构以及简单说明

    Linux系统目录结构以及简单说明 linux目录图: / root --- 启动Linux时使用的一些核心文件.如操作系统内核.引导程序Grub等. home --- 存储普通用户的个人文件 ftp ...

  10. 浅谈WEB前后端分离

    重审业务逻辑 用过MVC的童鞋都知道业务逻辑(Bussiness Logic),但是大多对这概念又是模棱两可,业务逻辑从来都是这样难以理解,谈论前后端分离之前这个概念非常有必要探讨一下! 在简单的CR ...