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

Sophie Loewenthal sophie at klunky.co.uk
Wed Jun 19 19:49:06 UTC 2019


On 2019-06-19 09:01, Alexander Moisseev via Users wrote:
> On 18.06.2019 20:50, Sophie Loewenthal wrote:
>>> 
>>> Please see:
>>> https://rspamd.com/doc/modules/bayes_expiry.html#limiting-memory-usage-to-a-fixed-amount
>> 
> 
>> 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
>> 
> What is "the extra redis configuration"?
> You may have missed the point. You need to store statistic in a
> separate Redis instance since you should not apply the eviction policy
> to everything, but only for statistic.

Admit I am confused here : Do I need two redis instances?  By instance I 
mean deamons ( current systemd only launches one deamon of redis) . One 
for "standard default rspamd keyvalues" and another instance for 
"bayes"?  I have just one instance on localhost:6379 - If two are 
needed, then this would seem to tie in with what you wrote. Can Bayes 
just be put in sqlite?  I thought I had this in sqlite afore in rspamd. 
I don't know Redis.

> 
>> 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"];
      * Changes rolled back

>> 
> Leave redis.conf as it is as it affects other modules.
> 
>> NEW
>> # cat classifier-bayes.conf
>> backend = "redis";
> 
>> servers = "localhost";
> You should specify port of the Redis instance.

Added,
    servers = "localhost:6379";

> 
>> new_schema = true;
> You can't just enable the new schema, you should convert statistic to
> the new format using `rspamadm configwizard statistic`.

    * configwizard statistic was run last year. Should I run this again?

> 
>> expire = 2144448000;
>> lazy = true;
> 
>> disabled_modules = ["ratelimit","greylist"];
> The disabled_modules directive should be in redis.conf

   * Changes rolled back.




More information about the Users mailing list