redis的RDB

###################################

 

redis的目录结构:

[work@a8-dba-cloud-db00.wh ~]$ tree redis_7007 
redis_7007
├── bin
│   ├── redis-benchmark
│   ├── redis-check-aof -> redis-server
│   ├── redis-check-rdb -> redis-server
│   ├── redis-cli
│   ├── redis-sentinel -> redis-server
│   └── redis-server
├── data
│   ├── appendonlydir
│   │   ├── appendonly-7007.aof.3.base.rdb
│   │   ├── appendonly-7007.aof.3.incr.aof
│   │   └── appendonly-7007.aof.manifest
│   ├── dump-7007.rdb
│   └── nodes-7007.conf
├── etc
│   └── redis.conf
├── log
│   └── redis-7007.log
└── tmp
    └── redis-7007.pid

6 directories, 14 files
[work@a8-dba-cloud-db00.wh ~]$ 

 

 

redis.conf配置文件中:

save 3600 1 300 100 60 10000

 

redis_7007/log/redis-7007.log:

16711:S 16 Feb 2023 10:57:25.708 * 10000 changes in 60 seconds. Saving...
16711:S 16 Feb 2023 10:57:25.709 * Background saving started by pid 20308
20308:C 16 Feb 2023 10:57:25.849 * DB saved on disk
20308:C 16 Feb 2023 10:57:25.850 * Fork CoW for RDB: current 4 MB, peak 4 MB, average 3 MB
16711:S 16 Feb 2023 10:57:25.853 * Background saving terminated with success
16711:S 16 Feb 2023 10:58:48.964 * 10000 changes in 60 seconds. Saving...
16711:S 16 Feb 2023 10:58:48.965 * Background saving started by pid 13522
13522:C 16 Feb 2023 10:58:49.144 * DB saved on disk
13522:C 16 Feb 2023 10:58:49.145 * Fork CoW for RDB: current 5 MB, peak 5 MB, average 3 MB
16711:S 16 Feb 2023 10:58:49.152 * Background saving terminated with success

说明触发了60秒内有10000次的变更,因此需要for一个进程来进行RDB的持久化

 

 

 

 

 

 

 

 

 

 

 

 

 

 

###############################

posted @ 2023-02-16 11:06  igoodful  阅读(55)  评论(0编辑  收藏  举报