redis-cli INFO | grep ^db
KEYS * keys *pattern* getset setnx # Set key value only if key does not exist
select 1
start the server with this config
redis-server --save "" --appendonly no --latency-monitor-threshold 100
- "redis-server" - "--latency-monitor-threshold" - "100" # when to save db on disk : # after 60 seconds if at least 1000 key changed - "--save" - "60 1000" # create a replayable insert log on the disk # can be activated simultaneously with the save command - "--appendonly" - "yes" - "--appendfilename" - "appendonly.aof" - "--appendfsync" - "everysec"
run a big benchmark :
docker exec redis redis-benchmark -q -n 100000
see latency :
docker exec redis redis-cli latency doctor docker exec redis redis-cli latency latest
docker exec redis -ti redis-cli 127.0.0.1:6379> debug sleep 1 127.0.0.1:6379> debug sleep .25 127.0.0.1:6379> latency latest 1) 1) "command" 2) (integer) 1405067976 # timestamp 3) (integer) 251 # latest latency 4) (integer) 1001 # worse latency
voir en live toutes les commandes lancées sur le serveur
docker exec -ti redis redis-cli monitor