1

I am in process of using clamd as a service for scanning multiple files in parallel.

My workflow:

  • ReadFile on client machine
  • Stream data in blocks to clamav service
  • Open clamd socket connection and write data on UnixSocket (clamd.ctl) (using clamd.ClamdUnixSocket())

This workflow works perfectly well when I have small files or just a few files being transferred over to my clamav service.

But as number of files in parallel increase, I am observing high write time on clam.ClamdUnixSocket.instream (internally, clamd.ctl unix socket).

Trying with 32-64 parallel files.
I also tried switching to network socket (TCP based) which also gives similar performance.

        #req is HTTP request (python) 
        ipfile = req.stream
        cus = clamd.ClamdUnixSocket()
        scan_res = cus.instream(ipfile)

Questions:

  • Is this a known issue ?
  • Are there any configurations which can be tweaked for better performance.

ClamAV information:
clamav version: 0.103.8
clamd daemon is installed on linux server
Virus definitions are up to date.

Rajat Doshi
  • 118
  • 7

0 Answers0