On Thursday, 11 December 2025 17:51:15 Central European Standard Time Andrew C 
Aitchison via clamav-users wrote:
> On Thu, 11 Dec 2025, Jonathan Lee via clamav-users wrote:
> > does ClamAV include any mechanisms or optimizations to manage or
> > minimize swap usage? For example, when using ClamAV together with
> > Squid, could signature updates or scanning tasks cause the system to
> > spill into swap space?
> 
> I am not aware of an option to pin the signature database into RAM.
> Signature updates require two copies of this unless you use
>      ConcurrentDatabaseReload=no
> (that will disable scanning while the database is rebuilt).
> 
> If you set up a separate machine to do the actual scan then Squid and
> ClamAV cannot fight for RAM, but there may be a network overhead and
> you wont be able to share an already open file handle with --fdpass.
> 
> Perhaps using a VM or similar container would allow you
> to pin the Clam container into RAM ?

I use systemd's resource-control features. [1]
For your case MemorySwapMax looks like the relevant option.


[1] 
https://manpages.debian.org/trixie/systemd/systemd.resource-control.5.en.html

Regards,

Martin


_______________________________________________

Manage your clamav-users mailing list subscription / unsubscribe:
https://lists.clamav.net/mailman/listinfo/clamav-users


Help us build a comprehensive ClamAV guide:
https://github.com/Cisco-Talos/clamav-documentation

https://docs.clamav.net/#mailing-lists-and-chat

Reply via email to