提交 ce833020 编写于 作者: A antirez

Saner VM defaults for redis.conf

上级 7c775e09
......@@ -203,11 +203,11 @@ vm-swap-file /tmp/redis-%p.vm
# RAM. Everything that deos not fit will be swapped on disk *if* possible, that
# is, if there is still enough contiguous space in the swap file.
#
# With vm-max-memory 10000000 the system will swap almost everything it
# can. Not a good default, just specify the max amount of RAM you can
# in bytes, but it's better to leave some margin. For instance specify
# an amount of RAM that's more or less 80% of your free RAM.
vm-max-memory 10000000
# With vm-max-memory 0 the system will swap everything it can. Not a good
# default, just specify the max amount of RAM you can in bytes, but it's
# better to leave some margin. For instance specify an amount of RAM
# that's more or less between 60 and 80% of your free RAM.
vm-max-memory 0
# Redis swap files is split into pages. An object can be saved using multiple
# contiguous pages, but pages can't be shared between different objects.
......@@ -218,7 +218,7 @@ vm-max-memory 10000000
# If you use a lot of small objects, use a page size of 64 or 32 bytes.
# If you use a lot of big objects, use a bigger page size.
# If unsure, use the default :)
vm-page-size 256
vm-page-size 32
# Number of total memory pages in the swap file.
# Given that the page table (a bitmap of free/used pages) is taken in memory,
......@@ -226,12 +226,12 @@ vm-page-size 256
#
# The total swap size is vm-page-size * vm-pages
#
# With the default of 256-bytes memory pages and 104857600 pages Redis will
# use a 25 GB swap file, that will use roughly 13 MB of RAM for the page table.
# With the default of 32-bytes memory pages and 134217728 pages Redis will
# use a 4 GB swap file, that will use 16 MB of RAM for the page table.
#
# It's better to use the smallest acceptable value for your application,
# but the default is large in order to work in most conditions.
vm-pages 104857600
vm-pages 134217728
# Max number of VM I/O threads running at the same time.
# This threads are used to read/write data from/to swap file, since they
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册