Redis数据文件解析和内存分析
Last updated
Was this helpful?
Last updated
Was this helpful?
Learn what are EOL (End of Line) or LF (Line Feed) or NL (New Line) ascii characters (\n\r) and why there are two (\n\r) newline characters.
一般会采用 bgsave 生成 dump.rdb 文件,再结合 redis-rdb-tools 和 sqlite 来进行静态分析。
BGSAVE:在后台异步(Asynchronously)保存当前数据库的数据到磁盘。
BGSAVE 命令执行之后立即返回 OK ,然后 Redis fork 出一个新子进程,原来的 Redis 进程(父进程)继续处理客户端请求,而子进程则负责将数据保存到磁盘,然后退出。
生成内存快照:redis-rdb-tools 是一个 python 的解析 rdb 文件的工具,在分析内存的时候,主要用它生成内存快照。
redis源码剖析(十三)—— dump.rdb文件分析 https://blog.csdn.net/csdn_kou/article/details/103400068
Redis 内存分析神器 https://zhuanlan.zhihu.com/p/99957693
Redis RDB 分析工具 rdbtools 说明 https://www.cnblogs.com/zhoujinyi/p/13276697.html
Redis replication tool. support sync, psync, psync2. can parse rdb, aof, mixed rdb and aof files. support redis-6.2