Is that fine if my Redis stores only 5.48 Mb of cache?

Your question

I have an actively used mail server with more than a 100 employees accounts, but the configured Redis in-memory store is storing just as much as 5mb of cache. Is that because I messed up the configuration or what could be the reason? If server uses only internal caching than why would i need Redis?

Stalwart version 0.15.5

I understand that topics in this category are triaged by a bot first but a human reply will follow up. If I’d prefer a human-only reply, I’ll add the no-ai tag to my topic.

on

5.48 MB is a reasonable footprint. Redis in Stalwart only holds short-lived, small key-value data (rate-limit counters, fail2ban records, OAuth authorization codes, ACME tokens, greylist tokens, distributed locks, Sieve auto-responder IDs). None of that is bulk email data, so its memory usage stays tiny regardless of mailbox count, message volume, or number of accounts. It is not caching your mail data, so a small size does not indicate misconfiguration.

If Redis is not configured at all, Stalwart falls back to using the primary data store (SQL/FoundationDB/RocksDB) as the in-memory store via the Default variant. Redis is recommended mainly for high-throughput or clustered deployments because it handles these ephemeral keys and expirations natively and offloads that churn from your main database, and it also provides pub/sub coordination between cluster nodes for things like IMAP IDLE and mailbox change notifications. If you’re running a single node without heavy load, a few MB is completely normal and does not mean something is misconfigured.

This is an automated reply from the Stalwart Help Bot. Other community members may follow up if this answer is incomplete or wrong.