#975401 clamav-daemon: clamd uses large amounts of memory

Package:
clamav-daemon
Source:
clamav
Description:
anti-virus utility for Unix - scanner daemon
Submitter:
Stephen Kitt
Date:
2021-06-29 20:57:04 UTC
Severity:
normal
#975401#5
Date:
2020-11-21 17:06:30 UTC
From:
To:
Dear Maintainer,

I noticed that clamd now uses large amounts of memory:

clamav    1006  1.9  3.6 1405692 1186776 ?     Ssl  17:53   0:12 /usr/sbin/clamd --foreground=true

I don’t remember it doing so until the last few weeks. Restarting it
or even rebooting doesn’t fix things.

What can I do to help investigate the causes?

Regards,

Stephen
--- data dir ---
total 644024
-rw-r--r-- 1 clamav  clamav   1458176 Sep 19  2019 bytecode.cld
-rw-r--r-- 1 clamav  clamav    115496 Aug 13  2004 clamav-9cf5c5af91bef25a
-rw-r--r-- 1 clamav  clamav    114048 Aug  5  2004 clamav-9d39da1493642b84
-rw-r--r-- 1 clamav  clamav    111152 Aug  4  2004 clamav-9e8ac33e38b57818
drwxr-xr-x 2 clamav  clamav      4096 Jun 21  2015 clamav-a0cf74401e8333c5fc885b9fc30365b8.tmp
-rw-r--r-- 1 root    root          66 May 10  2004 clamav-daemon.md5sum
-rw-r--r-- 1 root    root          48 Oct  4  2003 clamav-freshclam.debconf
-rw-r--r-- 1 clamav  clamav 350221824 Nov 21 15:43 daily.cld
drwxr-xr-x 2 clamav  clamav      4096 May 19  2008 daily.inc
-rw-r--r-- 1 root    root          66 May 10  2004 etc.clamav.conf.md5sum
-rw-r--r-- 1 root    root          33 Sep  6  2004 etc.freshclam.conf.md5sum
-rw-r--r-- 1 uml-net iocard      4029 Jun 21  2003 ff6d47135e931668
-rw-r--r-- 1 clamav  clamav 307403264 Nov 25  2019 main.cld
drwxr-xr-x 2 clamav  clamav      4096 May 19  2008 main.inc
-rw-r--r-- 1 root    root          86 Jul  3  2003 mirrors.txt.OLD

#975401#10
Date:
2021-06-29 20:18:05 UTC
From:
To:
1.1g RES here.

It grew overtime, I guess this is mostly the database that grew. Since
103 it jumps to twice as much during reload since it does not block scan
requests but creates a new database and switches once it is complete.

That said I have no idea. I could forward this upstream if the size
could checked / documented or so. I remember half a year ago (or so) it
was less than 1GiB.

Sebastian