Daemonize no Redis is not running as a daemon by default, it can be modified by this configuration item and the daemon is enabled with Yes
Pidfile/var/run/redis.pid when Redis is running as a daemon, Redis writes the PID to the/var/run/redis.pid file by default and can be specified by pidfile
Port 6379 Specifies a Redis listening port with a default port of 6379
# bind 127.0.0.1 The host address of the binding
Timeout 0 Closes the connection when the client is idle for a number of seconds, if specified as 0, to turn off the feature
LogLevel verbose Specify logging level, Redis supports four levels in total: Debug, verbose, notice, warning, default = verbose
LogFile stdout logging mode, default to standard output, if Redis is configured to run as Daemon, and here is configured as logging mode as standard output, then the log will be sent to/dev/null, that is, do not log
Databases 16 set the number of databases, the default database is 0, you can use the Select <dbid> command to specify the database ID on the connection
Large weight Analysis Save the DB on disk
Save 1save 10save 60 10000 indicates 1 changes in 900 seconds (15 minutes), 300 changes in 5 seconds (10 minutes), and 60 changes in 10,000 seconds. Specify how many times the update operation will synchronize the data to the data file and can be combined with multiple conditions
Rdbcompression Yes Specifies whether the data is compressed when stored to the local database, the default is Yes,redis with LZF compression, if you want to save CPU time, you can turn off this option, but it will cause the database file to become huge
Dbfilename DUMP.RDB Specifies the local database file name, the default value is Dump.rdb
Dir./Specify the local database to hold the directory
# slaveof <masterip> <masterport>slaveof <masterip> <masterport> settings When this machine is Slav service, Set the IP address and port of the master service, which automatically synchronizes data from master when Redis boots
# Masterauth <master-password>masterauth <master-password> when the master service is password protected, the Slav service connects to the master's password
# Requirepass foobared requirepass foobared set up Redis connection password, if connection password is configured, client will need to provide password via auth <password> command when connecting Redis, turn off by default
# maxclients 128maxclients 128 Sets the maximum number of client connections at the same time, the default is unrestricted, and Redis can open at the same number of client connections as the maximum number of file descriptors that the Redis process can open, if set maxclients 0, which means no restrictions. When the number of client connections reaches the limit, Redis closes the new connection and returns the max number of clients reached error message to the client
# maxmemory <bytes> maxmemory <bytes> specify Redis max memory limit, Redis will load data into memory at startup, and Redis will try to clear expired or expiring keys first when it reaches maximum memory , when this method is processed, the maximum memory setting is still reached and the write operation is no longer available, but the read operation is still possible. Redis new VM mechanism will store key memory, value will be stored in swap area
AppendOnly noappendonly No Specifies whether logging occurs after each update operation, Redis asynchronously writes data to the disk by default and, if not turned on, may cause data loss over time during a power outage. Because the Redis itself synchronizes data files in sync with the save conditions above, some data will only exist in memory for a period of time. Default is No
Appendfilename appendonly.aof Specifies the update log file name, which defaults to appendonly.aof
# If unsure, use "everysec". # Appendfsync Alwaysappendfsync everysec# appendfsync No Specify update log conditions, There are 3 optional values: No: Indicates that the data cache of the operating system is synchronized to disk (fast) Always: Represents a manual call to Fsync () to write data to disk (slow, secure) after each update operation Everysec: Indicates synchronization once per second (tradeoff, default)
Vm-enabled no specifies whether the virtual memory mechanism is enabled, the default value is no, a simple introduction, the VM mechanism to store data paging, by Redis will be less accessible pages, such as cold data swap to disk, Access to multiple pages is automatically swapped out into memory by the disk (in a later article I will carefully analyze the Redis VM mechanism)
Vm-swap-file/tmp/redis.swap virtual memory file path, default value is/tmp/redis.swap, cannot be shared by multiple Redis instances
Vm-max-memory 0 stores all data larger than vm-max-memory in virtual memory, regardless of the vm-max-memory settings, all index data is memory stored (REDIS index data is keys), that is, When Vm-max-memory is set to 0, all value is actually present on the disk. The default value is 0
Vm-page-size 32Redis swap files are divided into a number of page, an object can be saved on more than one page, but a page can not be shared by multiple objects, Vm-page-size is based on the size of the stored data to set, The author suggests that if you store many small objects, the page size is best set to 32 or 64bytes, and if you store large objects, you can use a larger page, and if you're not sure, use the default values
Vm-pages 134217728 Sets the number of pages in the swap file, because the page table (a bitmap that indicates that the page is idle or used) is in memory and consumes 1byte of memory per 8 pages on disk.
Vm-max-threads 4 Sets the number of threads to access the swap file, preferably not exceeding the machine's number of cores, and if set to 0, all operations on swap files are serial and may result in a long delay. The default value is 4
Hash-max-zipmap-entries 512hash-max-zipmap-value 64 Specifies that a special hashing algorithm is used when more than a certain number or maximum element exceeds a certain threshold
# include/path/to/local.conf# include/path/to/ OTHER.CONF Specifies that additional configuration files can be used to use the same profile between multiple Redis instances on the same host, while each instance has its own specific configuration file
From for notes (Wiz)
redis.conf parsing