View patch.diff
diff --git a/src/evict.c b/src/evict.c
index 802997c..24fb283 100644
--- a/src/evict.c
+++ b/src/evict.c
@@ -336,11 +336,34 @@ unsigned long LFUDecrAndReturn(robj *o) {
* server when there is data to add in order to make space if needed.
* --------------------------------------------------------------------------*/
+/* We don't want to count AOF buffers and slaves output buffers as
+ * used memory: the eviction should use mostly data size. This function
View 4.2-roadmap.md

Redis 4.2 roadmap

  1. Redis Cluster
    • Speed up key -> hashslot association. Now makes RBB loading 4x slower when there are many small keys.
    • Better multi data center story
    • redis-trib C coded and moved into redis-cli
    • Backup / Restore of Cluster
    • Non blocking MIGRATE (also consider not using 2X memory)
    • Faster resharding
    • Bug fixing and stress testing to bring it to next level of maturity
View listpack.md

Listpack specification

Version 1.0, 1 Feb 2017: Intial specification.

Version 1.1, 2 Feb 2017: Integer encoding simplified. Appendix A added.

Version 1.2, 3 Feb 2017: Better specify the meaning of the num-elements
                         field with value of 65535. The two 12 bits
                         positive/negative integers encodings were
View stresstest.rb
require 'redis'
Chars=('A'..'Z').to_a
def g(prefix)
choice = rand(9)
if (choice == 0)
# Values around this size stress the cascading update.
len = [252,250].shuffle.first
prefix += rand(1000000).to_s
string = prefix + ("A"*(len-prefix.length))
View stresstest.c
/* gcc ziplist-stresstest.c zmalloc.c ziplist.c util.c sha1.c sds.c -Wall -W -O2 -o zl-test -ggdb -g; ./zl-test.
*
* To run with gcov use -Wall on OSX use -fprofile-arcs -ftest-coverage. */
#include "ziplist.h"
#include "util.h"
#include <string.h>
#include <assert.h>
#include <stdlib.h>
#include <stdio.h>
View gist:779a83400dc5a4835a954123948629a4
redis_version:2.4.13
redis_git_sha1:00000000
redis_git_dirty:0
arch_bits:64
multiplexing_api:epoll
gcc_version:4.1.2
process_id:3751
uptime_in_seconds:95986904
uptime_in_days:1110
lru_clock:1439339
View start.txt
23697:C 20 Dec 08:39:49.630 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
23697:C 20 Dec 08:39:49.631 # Redis version=999.999.999, bits=64, commit=074383f8, modified=1, pid=23697, just started
23697:C 20 Dec 08:39:49.631 # Warning: no config file specified, using the default config. In order to specify a config file use ./redis-server /path/to/redis.conf
23697:M 20 Dec 08:39:49.632 * Increased maximum number of open files to 10032 (it was originally set to 4864).
23697:M 20 Dec 08:39:49.633 * Running mode=standalone, port=6379.
23697:M 20 Dec 08:39:49.633 # Server initialized
23697:M 20 Dec 08:39:49.633 * DB loaded from disk: 0.000 seconds
23697:M 20 Dec 08:39:49.633 * Ready to accept connections
View atomic.diff
-#if defined(__ATOMIC_RELAXED) && (!defined(__clang__) || __apple_build_version__ > 4210057)
+#if defined(__ATOMIC_RELAXED) && (!defined(__clang__) || !defined(__APPLE__) || __apple_build_version__ > 4210057)
View normal_prng.c
/* Copyright (C) 2016 Salvatore Sanfilippo. All Rights Resereved.
* This code is released under the BSD 3 clause license. */
#include <math.h>
#include <stdlib.h>
/* Return a random number with normal distribution and the specified
* mean and variance. It uses the "polar method" but does not cache one
* of the previously generated random numbers, it just returns a single
* one per iteration in order for the function to be completely stateless. */
View nnexample.txt
# Create a neural network with 2 inputs, 1 output, 3 hidden units.
127.0.0.1:6379> NR.CREATE net regressor 2 3 -> 1 normalize dataset 50 test 10
(integer) 13
# Feed it with some data.
127.0.0.1:6379> NR.OBSERVE net 1 2 -> 3
1) (integer) 1
2) (integer) 0