当前位置:网站首页>Redis RDB快照
Redis RDB快照
2022-07-01 22:58:00 【Mar丶流年】
2个生成快照的命令
save 在主线程中进行,会阻塞主线程
bgsave 创建子进程执行快照任务
全量快照
对所有数据做快照
增量快照
在上一次的全量快照上基础上进行更改
假设在t0时刻做了全量快照
在t1时刻进行了更改数据操作
在t2做快照就需要知道t1时刻干了什么
做增量备份是需要额外的开销来记录数据的更改操作
全量快照 + AOF
redis 4 以后提供了像mysql一样的 快照 + 日志 来恢复数据
快照的读写处理
假设redis数据量比较大,t0时刻 数据 A = 10
t0时刻做快照,快照耗时10分钟,完后后的快照中A应该等于10
如果第九分钟将A改成9。怎么保证快照的结果A = 10
让redis写操作,等待快照是不现实的
redis解决这个问题,采用了操作系统的写时复制
在做快照时,子进程拷贝主线程的内存的必要数据,并指向相同的内存空间,共用同一数据。
当主线程中redis修改数据时,会重新分配一个内存空间(副本),原始数据拷入副本供给子进程使用
边栏推荐
- SWT/ANR问题--SWT 导致 low memory killer(LMK)
- 2022安全员-C证考试题模拟考试题库及模拟考试
- Microservice stability management
- mysql ---- Oracle中的rownum转换成MySQL
- Why is PHP called hypertext preprocessor
- Postgresql源码(57)HOT更新为什么性能差距那么大?
- 每日三题 6.30(2)
- 赵福全:短期解决保供,长期要打造安全、高效有韧性的供应链
- 什么是马赛克?
- SWT / anr problem - SWT causes low memory killer (LMK)
猜你喜欢

2022安全员-C证考试题模拟考试题库及模拟考试

Istio, ebpf and rsocket Broker: in depth study of service grid

2022 examination questions and online simulation examination for safety management personnel of hazardous chemical business units

Notes on problems - /usr/bin/perl is needed by mysql-server-5.1.73-1 glibc23.x86_ sixty-four

mt管理器测试滑雪大冒险

What is the relationship between modeling and later film and television?

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

物联网现状及未来发展趋势

马赛克后挡板是什么?

CKS CKA CKAD 将终端更改为远程桌面
随机推荐
Typescript enumeration
Aaai22 | structural tagging and interaction modeling: a "slim" network for graph classification
Airserver latest win64 bit personal screen projection software
距离度量 —— 汉明距离(Hamming Distance)
从第三次技术革命看企业应用三大开发趋势
物联网现状及未来发展趋势
Redis data types and application scenarios
【微服务|Sentinel】SentinelResourceAspect详解
Daily three questions 6.30 (2)
SWT / anr problem - SWT causes low memory killer (LMK)
什么是马赛克?
Microservice stability management
Postgresql源码(58)元组拼接heap_form_tuple剖析
神经网络物联网的发展趋势和未来方向
Zero foundation tutorial of Internet of things development
[micro service sentinel] sentinel integrates openfeign
Compare the version number [double pointer to intercept the string you want]
Commemorate becoming the first dayus200 tripartite demo contributor
The online beggar function of Japanese shopping websites
flutter Unable to load asset: assets/images/888. png
