Author Topic: Running multiple scanners on the same server  (Read 6221 times)

0 Members and 1 Guest are viewing this topic.

Offline Capitalist

  • Newbie
  • *
  • Posts: 4
Running multiple scanners on the same server
« on: July 23, 2022, 09:51:05 AM »
I would like to run the scan every night. However, if there is not enough time to complete the previous scan. The result for running two scans without any protective measures is a process which never completes.

There is enough I/O and cpu power to run multiple scans on the same server. If I have understood correctly, this requires using multiple sockets, one for each server. And then some magic how to divide the work approximately evenly between the processes. Is there anywhere any examples available how to set up multiple Avast services on the same host in order to complete the scan faster? The real-time scanner has an option for parallelism, but that is not what I am looking for now.
« Last Edit: July 24, 2022, 05:57:31 AM by Capitalist »

Offline Radek Brich

  • Developer (Linux AV, Mac AV)
  • Avast team
  • Jr. Member
  • *
  • Posts: 56
Re: Running multiple scanners on the same server
« Reply #1 on: July 29, 2022, 01:58:24 PM »
Hi, running multiple scans in parallel is supported. It should work without any conflict.

E.g. if you start multiple processes for the `scan` tool, then each one will create a new scanning session and those will not clash with each other.
Similarly with avast-protocol(5), you can initiate multiple sessions via the scan.sock (each new connection creates new session). The avast-rest frontend is creating a pool of scan sessions internally, so it can handle incoming requests in parallel.

This all works with a single avast.service (/usr/bin/avast), which internally creates threads for the parallel scan sessions.

If you are encountering any issue with parallel scans, please specify in detail how you're doing the scans.