[Clamav-devel] Best way to introduce feature to reduce memory footprint?
Markus Kolb
markus.kolb+clamav at tower-net.de
Sun Sep 8 15:00:29 EDT 2019
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.
With e.g. MemoryLimit=300M it is swapping the rest...
VmPeak: 1076528 kB
VmSize: 1010992 kB
VmLck: 0 kB
VmPin: 0 kB
VmHWM: 304828 kB
VmRSS: 10888 kB
RssAnon: 6760 kB
RssFile: 4128 kB
RssShmem: 0 kB
VmData: 811616 kB
VmStk: 132 kB
VmExe: 168 kB
VmLib: 14556 kB
VmPTE: 1672 kB
VmPMD: 16 kB
VmSwap: 740816 kB
Without limit:
VmPeak: 1002792 kB
VmSize: 937256 kB
VmLck: 0 kB
VmPin: 0 kB
VmHWM: 752020 kB
VmRSS: 752020 kB
RssAnon: 752020 kB
RssFile: 0 kB
RssShmem: 0 kB
VmData: 800760 kB
VmStk: 132 kB
VmExe: 168 kB
VmLib: 14556 kB
VmPTE: 1648 kB
VmPMD: 16 kB
VmSwap: 0 kB
What would happen if there is no swapspace? OOM?
More information about the clamav-devel
mailing list