Re: Best way to introduce feature to reduce memory footprint?
Per Jessen <[email protected]> Mon, 09 Sep 2019 08:51:10 +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: >> 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. _______________________________________________ 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