From 14cacb390f05756f2dc432c432a095864b3093f1 Mon Sep 17 00:00:00 2001 From: melody Date: Fri, 11 Oct 2024 08:30:49 +0000 Subject: [PATCH] fix: Updated Redis page Signed-off-by: melody --- .../microservices/general/database/Ch-Redis.md | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/docs_src/microservices/general/database/Ch-Redis.md b/docs_src/microservices/general/database/Ch-Redis.md index 8b077439d..eaf057556 100644 --- a/docs_src/microservices/general/database/Ch-Redis.md +++ b/docs_src/microservices/general/database/Ch-Redis.md @@ -15,6 +15,19 @@ Redis uses a number of techniques to optimize memory utilization. Antirez and [R ## On-disk Persistence -Redis supports a number of different levels of on-disk persistence. By default, snapshots of the data are persisted every 60 seconds or after 1000 keys have changed. Beyond increasing the frequency of snapshots, append only files that log every database write are also supported. See https://redis.io/topics/persistence for a detailed discussion on how to balance the options. +Redis supports a number of different levels of on-disk persistence. By default, the configuration includes multiple save intervals: -Redis supports setting a memory usage limit and a policy on what to do if memory cannot be allocated for a write. See the MEMORY MANAGEMENT section of https://raw.githubusercontent.com/antirez/redis/5.0/redis.conf for the configuration options. Since EdgeX and Redis do not currently communicate on data evictions, you will need to use the EdgeX scheduler to control memory usage rather than a Redis eviction policy. \ No newline at end of file +- After 1 hour, if at least 1 key has changed. +- After 5 minutes, if at least 100 keys have changed. +- After 1 minute, if at least 10,000 keys have changed. + +This can be checked by running the command: +```shell +127.0.0.1:6379> CONFIG GET save +1) "save" +2) "3600 1 300 100 60 10000" +``` + +Beyond increasing the frequency of snapshots, append-only files that log every database write are also supported. See [Redis Persistence](https://redis.io/topics/persistence) for a detailed discussion on how to balance the options. + +Redis supports setting a memory usage limit and a policy on what to do if memory cannot be allocated for a write. See the MEMORY MANAGEMENT section of [the Redis configuration file](https://raw.githubusercontent.com/antirez/redis/7.0/redis.conf) for the latest configuration options. Since EdgeX and Redis do not currently communicate on data evictions, you will need to use the EdgeX scheduler to control memory usage rather than a Redis eviction policy. \ No newline at end of file