[Rspamd-Users] Redis learned_ids key has huge size.

Alexander Moisseev moiseev at mezonplus.ru
Mon Jan 27 10:19:06 UTC 2020

27.01.2020 11:54, Gabriele Nencioni пишет:
> Anyway I have to incrase the redis server memory because I have many
> keys, becasue I have configured the per-user statistics classifier.
> # redis-cli info memory
> # Memory

> maxmemory_policy:allkeys-lru

LRU is not good for Bayesian statistics as it leaves a lot of meaningless tokens. "used" != "useful".
And it can be harmful for other data if you store everything in the same Redis instance.
I would suggest to use smarter Bayes expiry module instead of LRU policy. Or, better yet, expiry module in conjunction with a separate Redis instance and volatile-ttl policy for statistics.

More information about the Users mailing list