[Rspamd-Users] rpsamd and redis memory expiration : allkeys-lru

Sophie Loewenthal sophie at klunky.co.uk
Tue Jun 18 17:50:51 UTC 2019


On 2019-06-18 09:15, Alexander Moisseev via Users wrote:
> On 17.06.2019 22:01, Sophie Loewenthal wrote:
>> Hi,
>> 
>> Is there any problem with rspamd if I swap volatile-lru for 
>> allkeys-lru in maxmemory-policy?  I have very little memory free on my 
>> little server.
>> 
> SNIP
> You should use volatile-ttl policy instead.
> 
> Please see:
> https://rspamd.com/doc/modules/bayes_expiry.html#limiting-memory-usage-to-a-fixed-amount

Hi Alexander,

Thanks for posting the link and recommeneding the correct policy.
I've changed redis.conf to use the volatile-ttl.

I am confused how the link you sent me would reduce the redis usage. It 
seems to increase it, but I admit don't know redis/rspamd well.


1. The extra redis configuration already has a dbfilename setting. Won't 
the extra file name cause problems?
# The filename where to dump the DB
dbfilename dump.rdb


2. I have now replaced my existing local.d/bayes.conf with 
ocal.d/bayes-classifier.conf. Is this correct?

OLD
# cat redis.conf
servers = "127.0.0.1";
disabled_modules = ["ratelimit","greylist"];

NEW
# cat classifier-bayes.conf
backend = "redis";
servers = "localhost";
new_schema = true;
expire = 2144448000;
lazy = true;
disabled_modules = ["ratelimit","greylist"];


More information about the Users mailing list