From ac79f1fb812d97d1485528d420537ad800dcd401 Mon Sep 17 00:00:00 2001 From: Egor Suvorov Date: Wed, 24 Aug 2016 11:31:28 -0400 Subject: [PATCH] Specify max memory and eviction policy for Redis server in run_program_with_redis.sh --- install/run_program_with_redis.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/install/run_program_with_redis.sh b/install/run_program_with_redis.sh index 15749e92a..cf3fe9cbe 100755 --- a/install/run_program_with_redis.sh +++ b/install/run_program_with_redis.sh @@ -8,6 +8,9 @@ # invoking several commands under same server. It's useful if you want to run # tests twice: once with cold-cache and once with warm-cache. # +# Redis is configured to store no more than 1GB of data and will evict some keys +# when it needs more memory. +# # Example (mind single quotes in the second command so substitution is # performed inside the script, not when you run it): # ../run_program_with_redis.sh \ @@ -24,7 +27,8 @@ source $(dirname "$BASH_SOURCE")/start_background_server.sh \ --port '$SERVER_PORT' \ --dir '$SERVER_WORKDIR' \ --logfile 'redis.log' \ - --maxmemory 1000000000 + --maxmemory 1gb \ + --maxmemory-policy allkeys-lru # SERVER_PORT is set by start_background_server.sh, we now want to export it # under a better name export REDIS_PORT=$SERVER_PORT