99
Redis Configuration
In Redis, there is a configuration file (redis.conf) available at the root directory of Redis. Although you can get and set all Redis configurations by Redis CONFIG command.
Syntax
Following is the basic syntax of Redis CONFIG command.
Example
Output
- “loglevel”
- “notice”
To get all configuration settings, use * in place of CONFIG_SETTING_NAME
Example
Output
- “dir”
- “C:\Program Files\Redis”
- “dbfilename”
- “dump.rdb”
- “requirepass”
- (nil)
- “masterauth”
- (nil)
- “maxmemory”
- “0”
- “maxmemory-policy”
- “volatile-lru”
- “maxmemory-samples”
- “3”
- “timeout”
- “0”
- “appendonly”
- “no”
- “no-appendfsync-on-rewrite”
- “no”
- “appendfsync”
- “everysec”
- “save”
- “3600 1 300 100 60 10000”
- “auto-aof-rewrite-percentage”
- “100”
- “auto-aof-rewrite-min-size”
- “1048576”
- “slave-serve-stale-data”
- “yes”
- “hash-max-zipmap-entries”
- “512”
- “hash-max-zipmap-value”
- “64”
- “list-max-ziplist-entries”
- “512”
- “list-max-ziplist-value”
- “64”
- “set-max-intset-entries”
- “512”
- “zset-max-ziplist-entries”
- “128”
- “zset-max-ziplist-value”
- “64”
- “slowlog-log-slower-than”
- “10000”
- “slowlog-max-len”
- “64”
- “loglevel”
- “verbose”
Edit Configuration
To update configuration, you can edit redis.conf file directly or you can update configurations via CONFIG set command.
Syntax
Following is the basic syntax of CONFIG SET command.
Example
Next TopicRedis Data Types