Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
ce833020
Commit
ce833020
authored
Feb 10, 2010
by
antirez
Browse files
Saner VM defaults for redis.conf
parent
7c775e09
Changes
1
Hide whitespace changes
Inline
Side-by-side
redis.conf
View file @
ce833020
...
@@ -203,11 +203,11 @@ vm-swap-file /tmp/redis-%p.vm
...
@@ -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
# 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.
# is, if there is still enough contiguous space in the swap file.
#
#
# With vm-max-memory
1000000
0 the system will swap
almost
everything it
# With vm-max-memory 0 the system will swap everything it
can. Not a good
#
can. Not a good
default, just specify the max amount of RAM you can
# default, just specify the max amount of RAM you can
in bytes, but it's
#
in bytes, but it's
better to leave some margin. For instance specify
# better to leave some margin. For instance specify
an amount of RAM
#
an amount of RAM
that's more or less 80% of your free RAM.
# that's more or less
between 60 and
80% of your free RAM.
vm
-
max
-
memory
1000000
0
vm
-
max
-
memory
0
# Redis swap files is split into pages. An object can be saved using multiple
# 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.
# contiguous pages, but pages can't be shared between different objects.
...
@@ -218,7 +218,7 @@ vm-max-memory 10000000
...
@@ -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 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 you use a lot of big objects, use a bigger page size.
# If unsure, use the default :)
# If unsure, use the default :)
vm
-
page
-
size
2
56
vm
-
page
-
size
3
2
# Number of total memory pages in the swap file.
# Number of total memory pages in the swap file.
# Given that the page table (a bitmap of free/used pages) is taken in memory,
# Given that the page table (a bitmap of free/used pages) is taken in memory,
...
@@ -226,12 +226,12 @@ vm-page-size 256
...
@@ -226,12 +226,12 @@ vm-page-size 256
#
#
# The total swap size is vm-page-size * vm-pages
# The total swap size is vm-page-size * vm-pages
#
#
# With the default of 2
56
-bytes memory pages and 1
04857600
pages Redis will
# With the default of
3
2-bytes memory pages and 1
34217728
pages Redis will
# use a
25
GB swap file, that will use
roughly 13
MB of RAM for the page table.
# 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,
# It's better to use the smallest acceptable value for your application,
# but the default is large in order to work in most conditions.
# but the default is large in order to work in most conditions.
vm
-
pages
1
04857600
vm
-
pages
1
34217728
# Max number of VM I/O threads running at the same time.
# 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
# This threads are used to read/write data from/to swap file, since they
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment