当前位置:网站首页>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修改数据时,会重新分配一个内存空间(副本),原始数据拷入副本供给子进程使用
边栏推荐
- 转行软件测试,知道这四点就够了!
- Jielizhi, production line assembly link [chapter]
- 2022 R1 fast opening pressure vessel operation test questions and answers
- Glass mosaic
- MySQL -- convert rownum in Oracle to MySQL
- Yunxin small class | common cognitive misunderstandings in IM and audio and video
- 问题随记 —— file /usr/share/mysql/charsets/README from install of MySQL-server-5.1.73-1.glibc23.x86_64 c
- 什么是马赛克?
- [micro service sentinel] @sentinelresource details
- AAAI22 | 结构标记和交互建模:用于图分类的“SLIM”网络
猜你喜欢

为什么PHP叫超文本预处理器

物联网现状及未来发展趋势
![Jielizhi Bluetooth headset quality control and production skills [chapter]](/img/ad/28e7461f8c5dc5c54a3f4da0c111ac.png)
Jielizhi Bluetooth headset quality control and production skills [chapter]

马赛克后挡板是什么?

2022 R1 fast opening pressure vessel operation test questions and answers

Matplotlib common settings

CKS CKA ckad change terminal to remote desktop

AAAI22 | 结构标记和交互建模:用于图分类的“SLIM”网络

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

2022年起重机司机(限桥式起重机)考试试题及模拟考试
随机推荐
The difference between timer and scheduledthreadpoolexecutor
The online beggar function of Japanese shopping websites
云信小课堂 | IM及音视频中常见的认知误区
玻璃马赛克
Yoga27 multidimensional all-in-one computer with excellent appearance and high-end configuration
为什么PHP叫超文本预处理器
马赛克后挡板是什么?
[MySQL] basic use of explain and the function of each column
from pip._internal.cli.main import main ModuleNotFoundError: No module named ‘pip‘
2022年危险化学品经营单位安全管理人员考试题及在线模拟考试
Who do you want to know when opening a stock account? Is it safe to open an account online?
STM32F030F4驱动TIM1637数码管芯片
Leetcode (34) -- find the first and last positions of elements in a sorted array
Future trend and development of neural network Internet of things
MySQL -- convert rownum in Oracle to MySQL
【微服务|Sentinel】sentinel整合openfeign
Notes to problems - file /usr/share/mysql/charsets/readme from install of mysql-server-5.1.73-1 glibc23.x86_ 64 c
证券开户选哪个证券公司比较好,哪个更安全
Linux foundation - centos7 offline installation of MySQL
神经网络物联网的发展趋势和未来方向
