Switch PFCOUNT to LogLog-Beta algorithm.

The new algorithm provides the same speed with a smaller error for
cardinalities in the range 0-100k. Before switching, the new and old
algorithm behavior was studied in details in the context of
issue #3677. You can find a few graphs and motivations there.
This commit is contained in:
antirez
2016-12-16 11:05:10 +01:00
parent 735b928b33
commit 2e375d4f42
4 changed files with 15 additions and 56 deletions

View File

@ -151,7 +151,6 @@ typedef long long mstime_t; /* millisecond time type. */
#define CONFIG_DEFAULT_LAZYFREE_LAZY_EVICTION 0
#define CONFIG_DEFAULT_LAZYFREE_LAZY_EXPIRE 0
#define CONFIG_DEFAULT_LAZYFREE_LAZY_SERVER_DEL 0
#define CONFIG_DEFAULT_HLL_USE_LOGLOGBETA 0
#define ACTIVE_EXPIRE_CYCLE_LOOKUPS_PER_LOOP 20 /* Loopkups per loop. */
#define ACTIVE_EXPIRE_CYCLE_FAST_DURATION 1000 /* Microseconds */
@ -1150,7 +1149,6 @@ struct redisServer {
int watchdog_period; /* Software watchdog period in ms. 0 = off */
/* System hardware info */
size_t system_memory_size; /* Total memory in system as reported by OS */
int hll_use_loglogbeta; /* Use loglog-beta algorithm for HLL */
};
typedef struct pubsubPattern {