[Clamav-devel] Best way to introduce feature to reduce memory footprint?

Per Jessen per at computer.org
Sun Sep 22 11:39:05 EDT 2019


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.



More information about the clamav-devel mailing list