From: Markus Frank <m.frank@proxmox.com>
To: pmg-devel@lists.proxmox.com
Subject: [pmg-devel] [PATCH pmg-api] config: adjust max_filters calculation to reflect current memory usage
Date: Wed, 10 Jan 2024 12:56:54 +0100 [thread overview]
Message-ID: <20240110115654.763820-1-m.frank@proxmox.com> (raw)
One pmg-smtp-filter process uses at least 220 MiB.
When having 100000 rules one process can take up to 330 MiB.
Therefore using 300 for the calculation more closely
reflects the current memory usage of one filter process.
Related OOM killer problem found in forum:
https://forum.proxmox.com/threads/123531/
Signed-off-by: Markus Frank <m.frank@proxmox.com>
---
src/PMG/Config.pm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/PMG/Config.pm b/src/PMG/Config.pm
index 7339e0d..90e39bb 100644
--- a/src/PMG/Config.pm
+++ b/src/PMG/Config.pm
@@ -458,7 +458,7 @@ sub get_max_filters {
# estimate optimal number of filter servers
my $max_servers = 5;
- my $servermem = 120;
+ my $servermem = 300;
my $memory = physical_memory();
my $add_servers = int(($memory - 512)/$servermem);
$max_servers += $add_servers if $add_servers > 0;
--
2.39.2
next reply other threads:[~2024-01-10 11:57 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-10 11:56 Markus Frank [this message]
2024-01-10 12:52 ` Dietmar Maurer
2024-01-10 13:04 ` Markus Frank
2024-01-10 13:38 ` Dominik Csapak
2024-01-10 13:40 ` Dominik Csapak
2024-01-10 13:57 ` Dietmar Maurer
2024-01-10 14:13 ` Dominik Csapak
2024-01-10 14:32 ` Dietmar Maurer
2024-01-12 10:13 ` Thomas Lamprecht
2024-01-15 18:05 ` Stoiko Ivanov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240110115654.763820-1-m.frank@proxmox.com \
--to=m.frank@proxmox.com \
--cc=pmg-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox