Redis taking huge size because of BAYES* keys. Enable bayes expiry setting in Rspamd?

Issue #772 new
Oleyley created an issue

Hi!

Redis takes ~2.5 GB of memory on my mailserver! It seems this is almost all concentraded into the BAYES_SPAM* and BAYES_HAM* keys, which are used by Rspamd. If I remove those keys redis drops to ~50MB…

It would be nice to manage this. Rspamd actually recommends to use the bayes expiry module.

This means adding expire = XX; into $CONFDIR/statistic.conf, where XX is the number of seconds. I’m not sure what duration would be best, but this would probably alleviate redis a lot, thus freeing a ton of precious server memory.

An additional thing which would be great is to also use the maxmemory and volatile-ttl settings to ensure redis doesn’t use more than a given amount of memory for its statistics. This could be set to say 500MB by default, and be changed via the mailserver “System settings“ page if desired.

I’m currently trying to test those solutions, but I’m not really familiar with the setup of the mailserver container. Is there any chance you could look into this? This could be quite a huge improvement on overall redis/memory usage.

Comments (1)

  1. Log in to comment