Kaspersky Scan Engine

Boosting performance of Kaspersky Scan Engine

Kaspersky Scan Engine supports multithreading. This feature allows you to use Kaspersky Scan Engine on high-load systems.

This section describes best practices for boosting performance of Kaspersky Scan Engine.

General recommendations on raising performance

To archive optimal performance, use the number of scanning processes equal to the number of CPU cores and two threads per process.

Recommendations for raising performance of Kaspersky Scan Engine in HTTP mode

The following list presents the recommended order of configuring Kaspersky Scan Engine for peak performance:

  1. Specify the number of scan processes and scan threads that you want in the ScannersCount parameter and the ThreadsCount parameter, respectively.

    The threads process scan tasks from the scan queue. The length of the scan queue is specified in the QueueLen parameter of the HTTP mode configuration file.

  2. Specify the maximum number of active TCP connections to Kaspersky Scan Engine in the MaxHTTPSessionsNum parameter.

    When Kaspersky Scan Engine works in a high-load environment, it is recommended to make the value of this parameter greater than the value of ThreadsCount, so that the scan queue is filled faster and scan threads do not stand idle. Please notice that Kaspersky Scan Engine loads files into system memory while scanning. The more active sessions Kaspersky Scan Engine has, the more system memory it consumes. You can limit the maximum allowed size of headers and bodies of HTTP messages that are sent to KAV HTTPD by specifying their maximum size in the MaxTCPFileSize parameter.

  3. Specify the desired number of pending TCP connections to Kaspersky Scan Engine in the MaxIncomingConnectionsNum parameter. Notice that this value is passed to the listen(2) system function and may be changed depending on the operating system.

It is recommended to set the value of MaxIncomingConnectionsNum several times greater than the value of MaxHTTPSessionsNum. This way, the pending connections will be put in the connection queue and scan tasks from these clients will not be lost.

Recommendations for raising performance of Kaspersky Scan Engine in ICAP mode

Specify the number of scan processes and scan threads that you want in the ScannersCount parameter and the ThreadsCount parameter, respectively.