[Clamav-devel] Best way to introduce feature to reduce memory footprint?
Per Jessen
per at computer.org
Mon Sep 9 02:51:10 EDT 2019
Markus Kolb wrote:
> Am 08.09.2019 19:28, schrieb Per Jessen:
>> Markus Kolb wrote:
>>
>>> Hey,
>>>
>>> I'd like to get some thoughts of reducing the memory footprint of
>>> clamav (clamd)...
>>
> [...]
>> MemoryLimit=500M (for instance)
>> This reduces the working set according to your spec, I have had it
>> running in 300M. Occasionally a scan will take longer, even up to a
>> minute, but 90% (in my context) are still processed in less than 1
>> sec.
>
> First thanks, this is a good idea and for my personal use case this
> would do it.
> But this doesn't really reduce the memory footprint.
True, only operationally. I just thought I would mention it, it's an
elegant solution when you want/need to reduce clamd memory consumption.
> With e.g. MemoryLimit=300M it is swapping the rest...
Yes, that is the whole point - swap out what isn't actively used.
Sometimes a scan will take longer, due to swapping in, but that's all.
> What would happen if there is no swapspace? OOM?
Almost certainly, yes.
--
Per Jessen, Zürich (11.5°C)
http://www.dns24.ch/ - free dynamic DNS, made in Switzerland.
More information about the clamav-devel
mailing list