for the first question: why doesn’t systemctl’s memory output match the metric reported by kumo? We’re reporting RSS of the kumod process only. systemd is reporting some other metric for the cgroup which contains kumod. They are different things. I couldn’t find a succinct description of the differences, but a longer general write up of how referring to memory usage is a hard problem, because there are many dimensions to it: https://superuser.com/a/1571475/45480
the stats that you shared don’t look bad, but it is hard to evaluate those without also the RSS value (that you see as Memory in kcli top) because that can help to understand the level of fragmentation
The top items are the pre-allocated memory for your various ready queues; that directly correlates with what you’ve configured as max_ready x the number of ready queues in the system. In the data you shared there are a few GiB of ready queues allocated (some from reception time, some from spooling in, so they have different call stacks).
The next highest ram usage was message bodies, but it looks to be less than 1GiB total in message bodies
Then there’s a few hundreds of MiB of shaping data.
The shaping data is larger than I would expect, and is likely due to having a couple of copies hanging around for use from different threads. That is something I will look into, however, it is still less memory than the ready queue usage
I would suggest that you review your max_ready values to make sure that they aren’t over-provisioned for your throughput. I wrote up Memory Management - KumoMTA Docs a couple of weeks ago with some general guidance for this
sure i can review the setting max_ready. the only thing that i can say is on the server we didnt had soo many messages laying around and the memory usage was around >40 GB.
hmm, I just added some aggregation into the summary tool; I didn’t put it there originally because I assumed that the re_memory crate would do a good job at aggregating. It shows that the top usage is actually the shaping data: