clamscan cpu consumption

Request and discuss new features you would like to have.
Post Reply
nicola.piazzi
Posts: 234
Joined: 23 Apr 2015 09:45

clamscan cpu consumption

Post by nicola.piazzi » 27 Dec 2018 14:56

I found that clamscan use a large cpu for each message scan
I think that is not related to size of file to scan but is related to load scan library each time that runs
in this example we can see that scanning 2 messages take a little more than 1 message only scam
but when invoked from mailscanner it reload each time
is there a solution to mantain in memory ?

2 FILES SCANNED IN 20 secs :
=========================
[root@EFA42 spamassassin]# time /usr/bin/clamscan --verbose /var/spool/MailScanner/quarantine/20181227/nonspam/E18*
Scanning /var/spool/MailScanner/quarantine/20181227/nonspam/E18051075D3.A0FF9
/var/spool/MailScanner/quarantine/20181227/nonspam/E18051075D3.A0FF9: OK
Scanning /var/spool/MailScanner/quarantine/20181227/nonspam/E18401027DC.AF8E2
/var/spool/MailScanner/quarantine/20181227/nonspam/E18401027DC.AF8E2: OK

----------- SCAN SUMMARY -----------
Known viruses: 6989322
Engine version: 0.99.2
Scanned directories: 0
Scanned files: 2
Infected files: 0
Data scanned: 2.09 MB
Data read: 1.04 MB (ratio 2.01:1)
Time: 20.264 sec (0 m 20 s)

real 0m20.281s
user 0m19.601s
sys 0m0.669s


1 FILE ONLY SCANNED IN 19 secs :
=============================
[root@EFA42 spamassassin]# time /usr/bin/clamscan --verbose /var/spool/MailScanner/quarantine/20181227/nonspam/E18401027DC.AF8E2
Scanning /var/spool/MailScanner/quarantine/20181227/nonspam/E18401027DC.AF8E2
/var/spool/MailScanner/quarantine/20181227/nonspam/E18401027DC.AF8E2: OK

----------- SCAN SUMMARY -----------
Known viruses: 6989322
Engine version: 0.99.2
Scanned directories: 0
Scanned files: 1
Infected files: 0
Data scanned: 2.09 MB
Data read: 1.04 MB (ratio 2.01:1)
Time: 19.398 sec (0 m 19 s)

real 0m19.404s
user 0m18.764s
sys 0m0.626s

Post Reply