TL;DR: quite likely your system has plenty of memory and is operating normally.
I'm not a Mailman expert, and don't know how much memory it needs to work. However, monitoring memory usage on Linux can be subtle. Linux views memory as a resource to be used. Any time data is read from or written to a file the data is kept in memory, just in case it is needed in the future. This feature fills up the memory with recently used "stuff". If the memory is close to full, then data residing in memory that has not been referenced in a while is discarded to make room for newer stuff. Linux does *not* free up memory until there is some demand for it.
For this reason, Linux servers tend to operate with > 90% of memory "used". In this context, "used" simply means some possibly useful data is in that memory. However, just because Linux is keeping a lot of possible old stuff in memory does not mean the system really needs all of that data in memory.
The purpose of memory is to make the system faster by avoiding reading data from files, using a copy in memory instead. If your system is performing well, you don't need to add memory. If the system is performing poorly, and the bottleneck is CPU cycles, adding memory probably won't help much. If, however, your system is not performing well and the bottleneck appears to be storage, adding memory might improve performance, by allowing the system to avoid paging to the swap disk and perhaps to avoid reading data from files.
I use "vmstat" to begin looking at this. Consider:
# vmstat 1 3 procs -----------memory---------- ---swap-- -----io---- -system-- ------cpu----- r b swpd free buff cache si so bi bo in cs us sy id wa st 1 0 0 311260 133136 315388 0 0 143 39 136 242 4 2 94 1 0 0 0 0 309716 133136 315388 0 0 0 0 199 377 2 1 97 0 0 0 0 0 310512 133136 315388 0 0 0 0 200 365 3 1 97 0 0
This is an idle system, so not much going on. Ignore the first line of data, it is historical. The "si" and "so" columns indicate whether data is being paged out to the swap disk. If this is going on, adding more memory will very likely help performance. The "wa" column is the % of time the system has work to do but is blocked waiting on something (storage) before it can make progress. If your system has a high "wa" percentage, adding memory might improve performance. OTOH if "us" + "sy" is approaching 100% you are running out of CPU cycles. Memory is unlikely to help.
You can find a very nice discussion complete with examples of all this here: https://access.redhat.com/solutions/1160343
-- Stephen
On Tue, Feb 15, 2022 at 5:28 AM Prasanth Nair <prasanth.nair@linaro.org> wrote:
Hi,
We are having an issue with high memory usage on our Mailman3 server. Initially, our server had 16GB RAM and the memory usage went up from 5% to 92% within a week. So, we increased the memory capacity to 32GB RAM and we can see that the memory usage is going up in the same pattern.
Any idea why it is happening? or any suggestions?
Kind regards, Prasanth Nair
Mailman-users mailing list -- mailman-users@mailman3.org To unsubscribe send an email to mailman-users-leave@mailman3.org https://lists.mailman3.org/mailman3/lists/mailman-users.mailman3.org/