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-pages 13421772826. Set the number of threads to access swap files, preferably do not exceed the machine's core number, if set to 0, then all the swap file operation is serial, may cause a relatively long delay.The default value is 4Vm-max-threads 427. Set when replying to the client, whether to merge the smaller package into one package send, the default is to turn
that indicates that the page is idle or used) is in memory and consumes 1byte of memory per 8 pages on disk.Vm-pages 13421772826. Set the number of threads to access swap files, preferably do not exceed the machine's core number, if set to 0, then all the swap file operation is serial, may cause a relatively long delay. The default value is 4Vm-max-threads 427. Set when replying to the client, whether to merge the smaller package into one package send, the default is to turn onGlueoutputbuf Yes
:
Glueoutputbuf Yes
28. Specifies that a special hashing algorithm is used when more than a certain number or maximum element exceeds a critical value
Copy Code code as follows:
Hash-max-zipmap-entries 64
Hash-max-zipmap-value 512
29. Specifies whether to activate the reset hash, which is turned on by default (described later when introducing the hash algorithm for
data read and write from the interchange file, and can also handle the data between memory and disk interaction and encoding/decoding processing.# More threads can improve processing efficiency to some extent, although I/O operations depend on the limitations of physical devices and do not increase the efficiency of single read and write operations because of more threads.## special value 0 turns off thread-level I/O and opens the blocking virtual memory mechanism.Vm-max-threads 4
###########
).
# Appendfsync Always
Appendfsync everysec
# Appendfsync No
################ VIRTUAL MEMORY ###########
#是否开启VM功能, the default value is no
Vm-enabled No
# vm-enabled Yes
#虚拟内存文件路径, the default value is/tmp/redis.swap, not multiple Redis instance sharing
Vm-swap-file/tmp/redis.swap
# store all data larger than vm-max-memory into virtual memory, regardless of how small the vm-max-memory is set, all index data is stored in memory (Redis index data is the keys), that is, when the vm-max-memory is
writable.
# # #APPEND only MODE setting
AppendOnly no #不使用AOF, AoF is another way to persist, and I am not using it because this way does not guarantee data availability in the event of server or disk corruption.
Appendfsync everysec
No-appendfsync-on-rewrite No
Auto-aof-rewrite-percentage 100
Auto-aof-rewrite-min-size 64MB
# # #SLOW LOG settings
Slowlog-log-slower-than 10000 # If the operation time is greater than 0.001 seconds, log slow log, this log is recorded in memory, you can use REDI
is not over critical, the hash is stored in zipmap.#zipmap又称为 small hash, can greatly reduce the use of memoryList-max-ziplist-entries 512List-max-ziplist-value 64Set-max-intset-entries 512Zset-max-ziplist-entries 128Zset-max-ziplist-value 64activerehashing YesClient-output-buffer-limit Normal 0 0 0Client-output-buffer-limit slave 256MB 64MB 60Client-output-buffer-limit pubsub 32MB 8MB 60Hz 10#一个任务可以使用的cpu
special hash algorithm is used.
hash-max-zipmap-entries 64 hash-max-zipmap-value 512
29. Specify whether to enable or disable hash resetting. The default setting is enable (this will be detailed later when we introduce the hash algorithm of Redis)
activerehashing yes
30. Specify other configuration files. You can use the same configuration file between multiple Redis instances on the same host, and each
certain number or maximum element exceeds a certain threshold.Hash-max-zipmap-entries 64Hash-max-zipmap-value 51222. Specifies whether to activate the reset hash, which is on by default (described later in the introduction of the Redis hashing algorithm).activerehashing Yes23. Slave sends a PING request to the server based on the specified interval. The time interval can be set by Repl_ping_slave_period.
the client, whether to merge the smaller package into one package send, the default is to turn onGlueoutputbufyes28. Specifies that a special hashing algorithm is used when more than a certain number or maximum element exceeds a critical valueHash-max-zipmap-entries64 Hash-max-zipmap-value29. Specify whether to activate the reset hash, which is on by default (described later in the introduction of the Redi
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 are unsure, use the default valuesvm-page-size25. Set the number of pages in the swap file, since 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-pages 13421772826. Set the number of threads to access swap files, preferably do not exc
, 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 are unsure, use the default valuesvm-page-size 32
Set the number of pages in the swap file, which consumes 1byte of memory per 8 pages on disk because the page table (a bitmap that indicates that the page is idle or used) is in memory.vm-pages 134217728
Set the number of threads to access the swap file, preferably without exceeding the machine's number of cores, if set to 0, al
the number of threads used to access the swap file. it is best not to exceed the number of server cores. if it is set to 0, all operations on the swap file are serial, which may cause a long delay. The default value is 4.
Vm-max-threads 4
27. set whether to combine a small package into a package for sending when responding to the client. the function is enabled by default.
Glueoutputbuf yes
28. when a specified number or maximum element exceeds a critical value, a special hash algorithm is used
hashing algorithm is used when more than a certain number or maximum element exceeds a critical valueHash-max-zipmap-entries 64Hash-max-zipmap-value 51229. Specify whether to activate the reset hash, which is on by default (described later in the introduction of the Redis hashing algorithm)activerehashing Yes30. Specify other profiles that can use the same configuration file across multiple Redis instances
disk.Vm-pages 13421772826. Set the number of threads to access swap files, preferably do not exceed the machine's core number, if set to 0, then all the swap file operation is serial, may cause a relatively long delay. The default value is 4Vm-max-threads 427. Set when replying to the client, whether to merge the smaller package into one package send, the default is to turn onGlueoutputbuf Yes28. Specifies that a special hashing algorithm is used when more than a certain number or maximum eleme
value is 1024, the maximum data for the slow log. Note that this consumes the content resource, and if you want to empty it you can execute the slowlog reset command;
The following are virtual memory-related settings, virtual within the 2.4 version of the obsolete, it is not mentioned herevm-enabled no vm-swap-file /tmp/redis.swap vm-max-memory 0 vm-page-size 32 vm-pages 134217728 vm-max-threads 4The following are the settings related to Advanced configuration:
Hash-max-
64MBThe following is a slow log-related setting that records queries that have an execution time exceeding the threshold. The execution time does not include the time taken by I/O operations or sending data to the client, but rather the time it takes to actually execute the command (that is, when the thread blocks cannot accept other requests):Slowlog-log-slower-than: Default value of 10000, in microseconds, defined as slow execution of the threshold;Slowlog-max-len: The default value is 1024,
, all value is actually present on the disk. The default value is 0Vm-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 valuesVm
################################ VIRTUAL MEMORY ################################ Whether to use virtual memory, the default value is no#vm-enabled No# vm-enabled Yes# Virtual memory file path, default value is/tmp/redis.swap, cannot be shared by multiple Redis instances#vm-swap-file D:/redis/redis.swap# store all data greater 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 the vm-max-memory
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.