当前位置:网站首页>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 导致 kernel fuse deadlock
- SWT / anr problem - SWT causes kernel fuse deadlock
- 认识线程
- 想请教股票开户要认识谁?在线开户是安全么?
- Leetcode (34) -- find the first and last positions of elements in a sorted array
- The difference between timer and scheduledthreadpoolexecutor
- Daily three questions 6.28
- Microservice stability management
- Zero foundation tutorial of Internet of things development
- SWT/ANR问题--SWT 导致 low memory killer(LMK)
猜你喜欢

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

物联网开发零基础教程

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

Huisheng Huiying 2022 intelligent, fast and simple video editing software
![Jielizhi Bluetooth headset quality control and production skills [chapter]](/img/ad/28e7461f8c5dc5c54a3f4da0c111ac.png)
Jielizhi Bluetooth headset quality control and production skills [chapter]
![Jerry's burning of upper version materials requires [chapter]](/img/65/fcd804e00dc08a2bd056e8e6493829.png)
Jerry's burning of upper version materials requires [chapter]

Paramètres communs de matplotlib

2021 RoboCom 世界机器人开发者大赛-高职组复赛

物联网应用技术专业是属于什么类
![Jielizhi, production line assembly link [chapter]](/img/84/73637de7ba334c5ac48895a7e82575.png)
Jielizhi, production line assembly link [chapter]
随机推荐
上海炒股开户选择手机办理安全吗?
【小程序】通过scroll-view组件实现左右【滑动】列表
AAAI22 | 结构标记和交互建模:用于图分类的“SLIM”网络
问题随记 —— /usr/bin/perl is needed by MySQL-server-5.1.73-1.glibc23.x86_64
Know --matplotlib
认识--Matplotlib
CADD course learning (3) -- target drug interaction
Behind sharing e-commerce: the spirit of CO creation, symbiosis, sharing, CO prosperity and win-win
Leetcode (34) -- find the first and last positions of elements in a sorted array
Win 10 mstsc connect RemoteApp
Aaai22 | structural tagging and interaction modeling: a "slim" network for graph classification
CKS CKA CKAD 将终端更改为远程桌面
What professional classification does the application of Internet of things technology belong to
Postgresql随手记(10)动态执行EXECUTING语法解析过程
Programming English vocabulary notebook
Postgresql源码(57)HOT更新为什么性能差距那么大?
Which securities company is better and which is safer to open a securities account
实在RPA:银行数字化,业务流程自动化“一小步”,贷款审核效率“一大步”
openresty 负载均衡
ShanDong Multi-University Training #3
