Bugzilla – Bug 11990
[clamav-users] Improving clamscan speed?
Last modified: 2017-12-19 11:35:08 EST
From the [clamav-users] list: Dan Rawson <drawson1@earthlink.net> Dec 16 (2 days ago) to ClamAV I've been thinking about adding clamav to my OpenSuSE system, so I've been running some tests . . . .and I'm now wondering if I can do something to speed up clamav. As a test, I've been scanning two file systms: /usr/local: 33Gb, ~140k files /home/<me>: 47Gb, ~77k files clamscan command line: --stdout -ori >> ${LOG} System: Shuttle SA76 (AMD quad-core Phenom II 2.8Ghz), 8GB memory, 2-1TB HDD, OpenSuSE LEAP 42.3 with current patches. The scan of my home directory takes over 2 hours, and it doesn't improve with repetition :-). In contrast, F-Prot's test version scans it in about 20 minutes. /usr/local is a similar time. I'm running a local build of 0.99.3-beta.1, but the results were essentially the same using 0.99.2 from the distro. What can I do to speed up the clamscan process? Thanks! Dan
May be related to https://bugzilla.clamav.net/show_bug.cgi?id=11856 (Parallel scanning in clamscan)
use tmp in tmpfs ? so it unpack as fast as possible
Some additional testing using a directory with 7200 files and about 8.5Gb The competition (f-prot) :-) 3:25 clamscan -v --stdout -r: 22:00 clamdscan -v --stdout: 22:30 clamdscan -m -v --stdout: 6:45 All of these tests were run from my Xfce desktop, but with no other applications running. Additional performance-related detail: Both clamav and f-prot use 100% of a core (ie, 25% of my available cycles on this quad-core machine) while they are scanning. But clamdscan -m uses EVERYTHING. "top" says it's using 399% :-) Because the directory in question is my "Downloads" directory, it does have a high percentage of compressed files. F-Prot reports 7200 files, but 92k "scanned objects" - don't know how to get that detail from clamscan.