admin 管理员组文章数量: 887021
2024年1月17日发(作者:网站设计制作服务好态度好)
1. # To enable VM just set 'vm-enabled' to yes, and set the
2. following three3. # VM parameters accordingly to your needs.4.
5. vm-enabled no6. # vm-enabled yes7.
8. # This is the path of the Redis swap file. As you can guess, swap
9. files0. # can't be shared by different Redis instances, so make sure to use a
1. swap2. # file for every redis process you are running. Redis will complain if
3. the4. # swap file is already in use.5. #6. # The best kind of storage for the
7. Redis swap file (that's accessed at random)8. # is a Solid State Disk
9. (SSD).0. #1. # *** WARNING *** if you are using a shared hosting the default
2. of putting3. # the swap file under /tmp is not secure. Create a dir with access
4. granted5. # only to Redis user and configure Redis to create the swap file
6. there.7. vm-swap-file /tmp/8.
9. # vm-max-memory configures the VM to use at max the specified amount
0. of1. # RAM. Everything that deos not fit will be swapped on disk *if* possible,
2. that3. # is, if there is still enough contiguous space in the swap
4. file.
5. #6. # With vm-max-memory 0 the system will swap everything it can. Not
7. a good8. # default, just specify the max amount of RAM you can in bytes, but
9. it's0. # better to leave some margin. For instance specify an amount of
1. RAM2. # that's more or less between 60 and 80% of your free
3. RAM.4. vm-max-memory 05.
6. # Redis swap files is split into pages. An object can be saved using
7. multiple8. # contiguous pages, but pages can't be shared between different
9. objects.0. # So if your page is too big, small objects swapped out on disk will
1. waste2. # a lot of space. If you page is too small, there is less space in the
3. swap4. # file (assuming you configured the same number of total swap file
5. pages).6. #7. # If you use a lot of small objects, use a page size of 64 or 32
8. bytes.9. # If you use a lot of big objects, use a bigger page size.0. # If
1. unsure, use the default :)2. vm-page-size 323.
4. # Number of total memory pages in the swap file.5. # Given that the page
6. table (a bitmap of free/used pages) is taken in memory,7. # every 8 pages on
8. disk will consume 1 byte of RAM.
9. #0. # The total swap size is vm-page-size *
1. vm-pages2. #3. # With the default of 32-bytes memory pages and 134217728 pages
4. Redis will5. # use a 4 GB swap file, that will use 16 MB of RAM for the page
6. table.7. #8. # It's better to use the smallest acceptable value for your
9. application,0. # but the default is large in order to work in most
1. conditions.2. vm-pages 1342177283.
4. # Max number of VM I/O threads running at the same time.5. # This threads
6. are used to read/write data from/to swap file, since they7. # also encode and
8. decode objects from disk to memory or the reverse, a bigger9. # number of
0. threads can help with big objects even if they can't help with1. # I/O itself
2. as the physical device may not be able to couple with many3. # reads/writes
4. operations at the same time.5. #6. # The special value of 0 turn off threaded
7. I/O and enables the blocking8. # Virtual Memory
9. implementation.0. vm-max-threads 41.
2. ############################### ADVANCED CONFIG
版权声明:本文标题:redis.conf文件内容介绍 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.freenas.com.cn/free/1705487327h486818.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论