当前位置:网站首页>Redis AOF log persistence
Redis AOF log persistence
2022-07-28 02:47:00 【yu-yuan】
AOF working principle
When you use Redis Do something , Will write what you do to a text file .
To configure :

appendonly This is aof Log function Whether to open yes

We are using AOF How to improve write speed and data persistence , Create a balanced plan , Here you can use
appendfsync always : Every time 1 All commands are synchronized to AOF Security , Slow speed
no : Write to the operating system , Because the operating system determines the buffer size , Write uniformly AOF, Low synchronization frequency , Fast .
eveysec : compromise proposal , Write once a second

no-appendfsync-on-rewrite yes: # Exporting rdb During snapshot , Do you want to stop syncing aof
auto-aof-rewrite-percentage 100 #aof The size of the file is larger than the last time it was rewritten , growth rate 100% when , rewrite
auto-aof-rewrite-min-size 64mb #aof file , At least more than 64M when , rewrite (bgrewriteaof Rewrite the command )
Interview frequently asked :
notes : stay dump rdb In the process ,aof If you stop synchronizing , Will you lose ?
answer : Can't , All operations are cached in memory queues , dump After completion , Unified operation .
notes : aof What does rewriting mean ?
answer : aof Rewriting refers to putting data in memory , Reverse into command , Write to .aof In the Journal To solve the problem aof The problem of too large log .
ask : If rdb file , and aof Files exist , Who will be the first to recover data ?
answer : rdb rdb Recover data quickly
ask : 2 Whether the two can be used at the same time ?
answer : Sure , And it's recommended
ask : When you recover rdb and aof Which recovers faster
answer : rdb fast , Because it is a memory mapping of data , Load directly into memory , and aof Is the command , It needs to be carried out item by item
边栏推荐
- Hardware standard
- 0动态规划中等 LeetCode873. 最长的斐波那契子序列的长度
- [self growth website collection]
- 树的孩子兄弟表示法
- 【LeetCode】13. Linked List Cycle·环形链表
- Detailed explanation of the lock algorithm of MySQL lock series (glory Collection Edition)
- With elephant & nbsp; Eplato created by swap, analysis of the high premium behind it
- Canvas 从入门到劝朋友放弃(图解版)
- mysql 如图所示,现有表a,表b,需求为 通过projectcode关联a、b表,查出address不同的 idcardnum。
- Common SQL statement query
猜你喜欢

What can you say to comfort your girlfriend or daughter-in-law

基于FPGA的64位8级流水线加法器
![[self growth website collection]](/img/42/fa17c9167697543defd3e63a97237a.png)
[self growth website collection]

Red hat official announced the new president and CEO! Paul Cormier, a key figure in transformation, is "retiring"

How to simply realize the function of menu dragging and sorting

pytest最好的测试框架

Smart contract security -- selfdestroy attack

Is the interface that can be seen everywhere in the program really useful? Is it really right?

How do you use the jar package sent by others (how to use the jar package sent by others)

Canonical Address
随机推荐
Design of edit memory path of edit box in Gui
windbg
特征值和特征向量
One month's experience of joining Huawei OD
QT implementation disable shortcut key
2022.7.8 eth price analysis
修改MySQL密码的四种方法(适合初学者)
Manual installation of Dlib Library
Detailed explanation of the lock algorithm of MySQL lock series (glory Collection Edition)
1313_pyserial的安装以及文档的生成
基于FPGA的64位8级流水线加法器
Necessary knowledge points of software engineering
Lock mechanism in MySQL database InnoDB storage engine (glory Collection Edition)
windbg
What is eplato cast by Plato farm on elephant swap?
What can you say to comfort your girlfriend or daughter-in-law
Chapter III queue
mysql: error while loading shared libraries: libtinfo.so. 5 solutions
Sword finger offer special assault edition day 12
初识C语言 -- 操作符和关键字,#define,指针