[clamav-users] Fwd: CLAMD CPU usage Adam Waller

G.W. Haywood clamav at jubileegroup.co.uk
Sat Jan 19 14:33:53 EST 2019


Hi there,

On Fri, 18 Jan 2019, Adam Waller wrote:

> ... clamav ... on all our VMs however ever since doing so we've
> noticed that clamd is consistently using up to 100% of a CPU core.

Sometimes VMs do odd things, but I'm not suggesting (at least not yet)
that it's likely to be the issue here.  Just bear it in mind.

> Just wondering if anyone can offer any advice on how to improve this.

Not without more information.

Apart from eating CPU cycles, you haven't said what clamd is doing.

What are you telling clamd to do?  Are you scanning mail, files, the
entire filesystem, nothing at all -- what?

FWIW I see clamd use about 100% of one CPU while it's reloading its
databases.  Typically it's reloading more than thirty databases (with
a total of just under ten million signatures) and it takes 40 seconds
to two minutes to do that, depending on the machine.  Apart from that,
I don't consider clamd to be a large consumer of CPU.  Memory, yes, it
typically has a gigabyte resident, but not CPU.  OTOH clamd doesn't do
an awful lot here.  It doesn't scan filesystems, and it doesn't even
get to scan all our mail.  Looking at characteristics of the mail such
as where it's sent from reach a 'reject' decision is more efficient so
I only ask clamd to scan things which aren't very obviously unwanted.
As a rough estimate, to scan large mail files here clamd on 2.4-2.7GHz
Opterons (bare metal, not VMs) takes two or three seconds/megabyte.

-- 

73,
Ged.



More information about the clamav-users mailing list