Christian Boltz wrote:
Hello,
the next heroes meeting will be on Thursday (2023-04-06) at 18:00 UTC / 20:00 CEST at https://meet.opensuse.org/heroes
Note: Europe switched to summer time, therefore the UTC time is now 18:00.
I don't think I'll be able to attend, I have a feeling it's going to
clash with dinner etc.
This month, I've been somewhat focused on mailman3 - the server that is.
George very kindly added some more memory poo#125501, mailman
seems/seemed insatiable when it comes to memory [more about that
later]. I had already added a 2Gb swapfile which helped a lot.
Next I decided to do something about an old ticket, poo#101842, about
nginx memory usage. The huge rewrite maps for the old archive URLs
have long meant nginx taking up about 1Gb of real memory. I'm not sure
if it is shared between nginx processes, although I think so. Still,
every time I saw a number of nginx processes each with 1Gb, it just
annoyed me.
So I wrote a small rewriting daemon for nginx to access as a proxy. It
reads in the same rewritemap, but manages to squeeze it into 300Mb,
with the active working set reduced to about 150Mb after a while.
With a binary search, even if only single-threaded, it is really fast -
estimated up 10000 reqs/sec. I expect that'll be okay for quite some
time :-)
Feeling all good about having achieved something worthwhile, I decided
to attack poo#102203 - about uwsgi/gunicorn memory usage. On my Google
travels, I came across some mention of python memory leaks ........
In the eternal words of Charlie Brown, see attached.
Long story short - by making gunicorn processing threads restart every X
requests, mailman3 memory usage took a dive, olympic style. Instead of
random processes being oom killed every day, mailman3 is now trundling
along with 9Gb of free memory and largely unused swap.