Re: Best way to introduce feature to reduce memory footprint?

Per Jessen <[email protected]> Sun, 22 Sep 2019 17:39:05 +0200
Newsgroups gmane.comp.security.virus.clamav.devel
Organization News-server @ ENIDAN Technologies GmbH
Message-ID <[email protected]>
Markus Kolb wrote:

> Am 08.09.2019 19:28, schrieb Per Jessen:
> 
>> This was discussed quite intensively on the openSUSE list just
>> recently:
>> 
>> Create /etc/systemd/system/clamd.service.d/memlimit.conf and add:
>> 
>> MemoryLimit=500M     (for instance)
>> TimeoutSec=300s
> 
> I've also cheered too soon.
> This doesn't always work as expected. ;-(
> 
> On forking the source process doesn't get/need cpu time any longer and
> always times out.
> It breaks down from 100% to 0-2% and mostly dead process. So it times
> out.

Change the timeout?  

> The exact limit (300M,400M,700M,800M) doesn't matter.
> The system is over 70% idle and real memory is enough free.
> Looks like some bug (systemd/kernel) in openSUSE 15.0.
> Or maybe because it is a KVM vhost? Don't know.
> On a bare metal host with openSUSE 15.1 it works.

The latter is what I tested it on, but I have some much smaller test
systems - they manage to run clamd in e.g. 784Mb of memory.  



-- 
Per Jessen, Zürich (23.1°C)
http://www.cloudsuisse.com/ - your owncloud, hosted in Switzerland.

_______________________________________________

clamav-devel mailing list
[email protected]
https://lists.clamav.net/mailman/listinfo/clamav-devel

Please submit your patches to our Bugzilla: http://bugzilla.clamav.net

Help us build a comprehensive ClamAV guide:
https://github.com/vrtadmin/clamav-faq

http://www.clamav.net/contact.html#ml