Carlos E. R. wrote:
On 2017-08-07 08:39, Per Jessen wrote:
Carlos E. R. wrote:
Could the daemon be started "on demand", and be killed a minute after the last email goes through?
I googled, and it seems that yes, clamd uses a lot of memory for the databases, and it can not be swapped out. Data, not code. However, I still don't understand why it remains in RAM hours after the last email was processed.
Possibly due to mlock(). Memory can be locked in. Or maybe clamd touches all of the database regularly.
My google finds (re clamd) say that you can not swap out a portion of the databases, because you do not know what will come in a file to scan. That I can understand, while scanning everything should be loaded in ram. But when nothing has been scanned for many minutes?
A quick grep through the libclamav source shows no mlock() calls. Maybe clamav wanders through the memory every so often? (like my code from my other posting) You could check to see what clamd does with an strace.
People setting up mailserver with small machines had to enlarge ram just for clamd, or it would crash.
768Mb per mailserver is what I used until a few months ago. Since 2006. It was a little too tight. -- Per Jessen, Zürich (21.2°C) http://www.cloudsuisse.com/ - your owncloud, hosted in Switzerland. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org