当前位置:网站首页>Redis RDB snapshot
Redis RDB snapshot
2022-07-01 23:27:00 【Mar, LiuNian】
List of articles
2 Commands to generate snapshots
save In the main thread , Will block the main thread
bgsave Create sub processes to execute snapshot tasks
Full snapshot
Take a snapshot of all data
Incremental snapshot
Make changes based on the last full snapshot
Suppose that t0 Take a full snapshot at any time
stay t1 The data change operation is carried out at any time
stay t2 To take a snapshot, you need to know t1 What did you do at any time
Doing incremental backup requires additional overhead to record data changes
Full snapshot + AOF
redis 4 In the future, it provides services like mysql Same snapshot + journal To recover data
Read / write processing of snapshots
hypothesis redis Large amount of data ,t0 moment data A = 10
t0 Take snapshots all the time , Snapshot time 10 minute , After the snapshot A It should be equal to 10
If the ninth minute will A Change to 9. How to ensure the results of snapshots A = 10
Give Way redis Write operations , Waiting for a snapshot is unrealistic
redis Solve this problem , Using the write time copy of the operating system
When taking a snapshot , The subprocess copies the necessary data of the memory of the main thread , And point to the same memory space , Share the same data .
When in the main thread redis When modifying data , Will reallocate a memory space ( copy ), Copy the original data into a copy for the sub process to use
边栏推荐
猜你喜欢

问题随记 —— file /usr/share/mysql/charsets/README from install of MySQL-server-5.1.73-1.glibc23.x86_64 c
![[applet] realize the left and right [sliding] list through the scroll view component](/img/18/b1b4e9923782856143721dad84cbab.png)
[applet] realize the left and right [sliding] list through the scroll view component

RPA: Bank digitalization, business process automation "a small step", and loan review efficiency "a big step"

win 10 mstsc连接 RemoteApp

距离度量 —— 汉明距离(Hamming Distance)

Concepts of dictionary, hash table and array

云信小课堂 | IM及音视频中常见的认知误区

认识--Matplotlib

什么是马赛克?

What is mosaic?
随机推荐
Why is PHP called hypertext preprocessor
【微服务|Sentinel】SentinelResourceAspect详解
sql 优化
SWT/ANR问题--SWT 导致 kernel fuse deadlock
想请教股票开户要认识谁?在线开户是安全么?
SWT / anr problem - SWT causes low memory killer (LMK)
What is the difference between memory leak and memory overflow?
Oracle中已定义者身份执行函数AUTHID DEFINER与Postgresql行为的异同
认识--Matplotlib
Concepts of dictionary, hash table and array
jpa手写sql,用自定义实体类接收
win 10 mstsc连接 RemoteApp
Yoga27 multidimensional all-in-one computer with excellent appearance and high-end configuration
Experience of practical learning of Silicon Valley products
Daily three questions 6.29
2022年起重机司机(限桥式起重机)考试试题及模拟考试
玻璃马赛克
notBlank 和 notEmpty
从第三次技术革命看企业应用三大开发趋势
SWT/ANR问题--SWT 导致 low memory killer(LMK)
