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

Markus Kolb markus.kolb+clamav at tower-net.de
Sat Sep 7 15:25:46 EDT 2019


Hey,

I'd like to get some thoughts of reducing the memory footprint of clamav 
(clamd)...

Do you have already some ideas of the way to introduce a feature like 
this?

Is my assumption correct that the loaded signature database in memory is 
the biggest part?

So my idea would be to do introduce some kind of optional/configurable 
round-robin loading of the signatures in limited blocks.
Scanning with the loaded signatures block, loading the next signatures 
block from db files and scanning, and so on, until all signatures are 
used.
With the next file to scan same procedure again...
Of course this would mean to slow down the scan process, but would free 
memory on the system.
At least this is the idea.

I've just had a fast look at the code how clamd engine is initialized 
and the db loading. So I might have missed something to think about.

Thanks for your help.

Markus


More information about the clamav-devel mailing list