当前位置:网站首页>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修改数据时,会重新分配一个内存空间(副本),原始数据拷入副本供给子进程使用
边栏推荐
- The online beggar function of Japanese shopping websites
- Behind sharing e-commerce: the spirit of CO creation, symbiosis, sharing, CO prosperity and win-win
- 想请教股票开户要认识谁?在线开户是安全么?
- [LeetCode] 最后一个单词的长度【58】
- flutter Unable to load asset: assets/images/888. png
- Know --matplotlib
- from pip._ internal. cli. main import main ModuleNotFoundError: No module named ‘pip‘
- Wechat personal small store one click opening assistant applet development
- 【微服务|Sentinel】@SentinelResource详解
- 玻璃马赛克
猜你喜欢
纪念成为首个DAYUs200三方demo贡献者
MySQL binlog cleanup
Commemorate becoming the first dayus200 tripartite demo contributor
Jielizhi Bluetooth headset quality control and production skills [chapter]
from pip._internal.cli.main import main ModuleNotFoundError: No module named ‘pip‘
CKS CKA CKAD 将终端更改为远程桌面
What category does the Internet of things application technology major belong to
问题随记 —— /usr/bin/perl is needed by MySQL-server-5.1.73-1.glibc23.x86_64
【小程序】通过scroll-view组件实现左右【滑动】列表
Experience of practical learning of Silicon Valley products
随机推荐
Win 10 mstsc connect RemoteApp
Linux基础 —— CentOS7 离线安装 MySQL
[understanding of opportunity-35]: Guiguzi - flying clamp - the art of remote connection, remote control and remote testing
CKS CKA ckad change terminal to remote desktop
flutter Unable to load asset: assets/images/888. png
mysql binlog的清理
微信个人小商店一键开通助手小程序开发
共享电商的背后: 共创、共生、共享、共富,共赢的共富精神
SWT/ANR问题--SWT 导致 low memory killer(LMK)
The digital summit is popular, and city chain technology has triggered a new round of business transformation
What category does the Internet of things application technology major belong to
硅谷产品实战学习感触
Which securities company is better and which is safer to open a securities account
Zhao Fuquan: to ensure supply in the short term, we should build a safe, efficient and resilient supply chain in the long term
2021 RoboCom 世界机器人开发者大赛-高职组复赛
[MySQL] basic use of explain and the function of each column
内存泄露和内存溢出的区别是什么?
Understanding threads
【微服务|Sentinel】SentinelResourceAspect详解
The online beggar function of Japanese shopping websites