# always: fsync after every write to the append only log . Slow, Safest.
# everysec: fsync only if one second passed since the last fsync. Compromise.
#
-# The default is "always" that's the safer of the options. It's up to you to
-# understand if you can relax this to "everysec" that will fsync every second
-# or to "no" that will let the operating system flush the output buffer when
-# it want, for better performances (but if you can live with the idea of
-# some data loss consider the default persistence mode that's snapshotting).
-
-appendfsync always
-# appendfsync everysec
+# The default is "everysec" that's usually the right compromise between
+# speed and data safety. It's up to you to understand if you can relax this to
+# "no" that will will let the operating system flush the output buffer when
+# it wants, for better performances (but if you can live with the idea of
+# some data loss consider the default persistence mode that's snapshotting),
+# or on the contrary, use "always" that's very slow but a bit safer than
+# everysec.
+#
+# If unsure, use "everysec".
+
+# appendfsync always
+appendfsync everysec
# appendfsync no
################################ VIRTUAL MEMORY ###############################
vm-enabled no
# vm-enabled yes
+# This is the path of the Redis swap file. As you can guess, swap files
+# can't be shared by different Redis instances, so make sure to use a swap
+# file for every redis process you are running.
+#
+# The swap file name may contain "%p" that is substituted with the PID of
+# the Redis process, so the default name /tmp/redis-%p.vm will work even
+# with multiple instances as Redis will use, for example, redis-811.vm
+# for one instance and redis-593.vm for another one.
+#
+# Useless to say, the best kind of disk for a Redis swap file (that's accessed
+# at random) is a Solid State Disk (SSD).
+vm-swap-file /tmp/redis-%p.vm
+
# vm-max-memory configures the VM to use at max the specified amount of
# 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.
# number of threads can help with big objects even if they can't help with
# I/O itself as the physical device may not be able to couple with many
# reads/writes operations at the same time.
+#
+# The special value of 0 turn off threaded I/O and enables the blocking
+# Virtual Memory implementation.
vm-max-threads 4
############################### ADVANCED CONFIG ###############################