Redis 持久化-AOF自动重写配置


AOF自动重写

auto-aof-rewrite-min-size size 
auto-aof-rewrite-percentage percent

在 redis.conf 自动重写的默认配置:

auto-aof-rewrite-percentage 100  //可以自己设置相关重写的条件
auto-aof-rewrite-min-size 64mb

使用 info persistence 命令获取持久化文件的相关信息

127.0.0.1:6379> info persistence
# Persistence
loading:0
......
//aof 当前大小 aof_current_size:0 aof_base_size:0 .....

自动重写出发条件如下:

aof_current_size > auto-aof-rewrite-min-size
aof_current_size-aof_base_size / aof_base_size = auto-aof-rewrite-percentage

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM