Redis size / memory usage

Issue #520 new
SB created an issue

Is there a way to shrink the size of memory Redis uses?

What is actually stored within here?

redis.PNG

Comments (7)

  1. SH repo owner

    It is used extensively for non-critical data, there are lot of small objects stored mainly used for caching, karma, all statistics or message-id delivery status tracking. Every object in redis should have expiration so technicaly it should not take more memory unless you are handling more traffic.

    How many emails/day are you handling? How many accounts do you have? I've checked couple instances and none of them is that big. I will try to create some usefull script to meassure inner content.

  2. SH repo owner

    In next version there will be "poste-redis-statistics" command. Right now you can try curl -s https://poste.io/poste-redis-statistics | docker exec -i mailserver bash - the part with PREFIXES is what will be interesting

  3. SB reporter

    Hi SH, Thank you for the information - this is what I get. Does this list just show a breakdown of what is stored within redis?

    echo ""
    echo "INFO ALL"
    echo "--------------------------------"
    echo "info all"|redis-cli
    
    echo ""
    echo "PREFIXES"
    echo "--------------------------------"
    echo ""
    
    sum "MSGID-TXID pairs" "msgid-txid|*"
    sum "Top statistics" "top|*"
    sum "Karma" "karma|*"
    sum "Bruteforce login stats" "bruteforce|*"
    sum "Login stats" "stats|*"
    sum "Delivery status" "status|*"
    sum "Bad connections block" "bbc|*"
    sum "Automatic guard stats" "guard|*"
    sum "Manual guard stats" "guard-manual|*"
    sum "Limit stats" "limit|*"
    sum "AS" "as*"
    sum "rcache" "rcache|*"
    sum "no_tls" "no_tls|*"
    sum "rs_history" "rs_history*"
    sum "tRFANN (rspamd)" "tRFANN*"
    sum "learned (rspamd)" "learned*"
    sum "fuzzy (rspamd)" "fuzzy*"
    sum "BAYES (rspamd)" "BAYES*"
    sum "RS (rspamd)" "RS*"
    sum "1*" "1*"
    sum "2*" "1*"
    

    Is it possible to find out how much memory each is taking up?

  4. SH repo owner

    You are pasting unexecuted script. It needs to be executed inside container with $ curl -s https://poste.io/poste-redis-statistics | docker exec -i mailserver bash

  5. Log in to comment