Increase Smart Group worker threads for on-Prem customers

Smart Groups compilation can often take more time than what customers assume, or effortlessly define as acceptable by themselves, and you may need to know the exact way compilation of Smart Groups is performed.

Find out more by running the following commands in the Linux terminal that will output useful definition of the compilation processing:

cd /usr/local/Secunia/csi/cronjobs/sgdaemon

more configuration.ini

There is an easy to understand logic that allows measurement and predictability of the process workings, and workers. The compilation process basically has the following simple logic:

File config.common.ini (path: Secuina/csi/api/config) having defined constant SMARTGROUP_GENERATION_FAST_LIMIT which decides smart group compile time duration to consider as 'fast track' or slow track.

Support can check the column 'time elapsed' column in table ca.csi_smartgroup_generation for existing partitions and can intelligently guess the required time to consider any partition as 'fast_track'.

If a Smart Group has last compiled for less than 5000ms (as example) - put it for next compilation in the "fast track"

If the Smart Group has last compiled for more than 5000ms (as example) - it will be forwarded through the "slow track"

Count of FastWorker and SlowWorker can be modified in file configuration.ini (Path: cronjobs/sgdaemon) based on existing CRON server load.

After making changes in configuration.ini, please restart the sgdaemon (systemctl restart sgdaemon).

The last compilation time depends on the value of each Smart Group as provided under the 'time elapsed' column that is present in the ca.csi_smartgroup_generation database table of the SVM server.

The server directory /usr/local/Secunia/csi/cronjobs/sgdaemon stores the smart group compilation and configuration settings at the configuration.ini file. Kindly restart.

In it, you could enable Smart Group generation logging as follows:

file_logging=1 sets logging for the SGDaemon service and writes the data at the /tmp/secunia_smartgroup_daemon_log.txt file