public inbox for pmg-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Dominik Csapak <d.csapak@proxmox.com>
To: Dietmar Maurer <dietmar@proxmox.com>,
	Markus Frank <m.frank@proxmox.com>,
	 pmg-devel@lists.proxmox.com
Subject: Re: [pmg-devel] [PATCH pmg-api] config: adjust max_filters calculation to reflect current memory usage
Date: Wed, 10 Jan 2024 15:13:22 +0100	[thread overview]
Message-ID: <e191921c-e6df-4929-96ba-00e8bd43fd6d@proxmox.com> (raw)
In-Reply-To: <1362643070.2197.1704895037948@webmail.proxmox.com>

On 1/10/24 14:57, Dietmar Maurer wrote:
>> i think it's easier than you think to blow up the filter memory usage, we're already
> 
> I am sure it is easy. But it is also wrong, as there are more efficient ways to implement blocklists.
> 
> Anyway, the suggested patch limits the number of parallel filters, and can thus severely limit mail throughput.

sure, but getting the filter oom killed (like the user in the forum did) also limits mail throughput

e.g. if you have 8 GiB of physical memory, the resulting max_workers is currently

(8192-512)/120 => 64 which results in a maximum of 40 processes (we cap it there)

but 40 processes at 220 MiB are already over 8 GiB

realistically the server can only handle

8GiB - 2.5Gib (clamav+remaining pmg daemond + postfix, etc, probably more with avast)
  = 5.5Gib / 220 MiB ~ 25 workers before something gets oom killed

using an estimated value of 300MiB results in a max_worker of 25, which would fit right
in that scenario, and for systems with more memory it looks even better
(as we approach the max 40 workers)

one could argue that we could improve the memory calculation by subtracting more base memory
(e.g. 2GiB) before calculating, but that also is a rather moving target (and i guess more
stable than the pmg-smtp-filter daemons? though not so sure about that)




  reply	other threads:[~2024-01-10 14:13 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-10 11:56 Markus Frank
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 [this message]
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=e191921c-e6df-4929-96ba-00e8bd43fd6d@proxmox.com \
    --to=d.csapak@proxmox.com \
    --cc=dietmar@proxmox.com \
    --cc=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
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal