Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Saner VM defaults for redis.conf

  • Loading branch information...
commit ce8330208aacd63743ce706be020b5a7838f0a29 1 parent 7c775e0
@antirez authored
Showing with 9 additions and 9 deletions.
  1. +9 −9 redis.conf
View
18 redis.conf
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.