[Solved] Configure the number of demmaccs workers

Hello,

I’ve installed Sen4CAP and I’m looking at the demmaccs processor. In the manual and in the logs I see that I can set the --processes-number-dem and --processes-number-maccs. I can easily do that if I run the executable directly, but through the Sen4CAP system how would I do it?

I am looking at the “config” table of the postgres db, but I do not see a relevant configuration option. Is there a way to configure this?

Ideally, this would result in more dmworker_Xs running for more tiles in parallel. Right now, I only see dmworker_0 and dmworker_1.

My goal of course is to minimize the processing time.

Thanks!

First of all, I think I’m conflicting two things in my initial post: the --processes-number-dem and --processes-number-maccs is a different setting than the number of dmwokers.

TBH, I’m not sure what is configured with --processes-number-dem and --processes-number-maccs. I am guessing this will parallelize the processing of previous L2A tiles, when multiple of those are given with the --prev-l2a-tiles configuration option.

The number of workers – which translates to how many tiles will be processed in parallel, for all sites (not for each site) – is configured by the --processes-number configuration option of the demmaccs_launcher.py script.

To configure this to your liking do the following:

  1. view the current service configuration and notice the ExecStart line.
$ sudo systemctl cat sen2agri-demmaccs.service
...
[Service]
Type=simple
ExecStart=/usr/share/sen2agri/sen2agri-demmaccs/demmaccs_launcher.py
...
  1. edit the service configuration to override the ExecStart line to add your needed configuration options
$ sudo systemctl edit sen2agri-demmaccs.service
[Service]
ExecStart=
ExecStart=/usr/share/sen2agri/sen2agri-demmaccs/demmaccs_launcher.py --processes-number 10

Here we define that the ExecStart line of the [Service] section, should be cleared and then defined again with the wanted configuration option (use a value that matches your host environment).

  1. save, exit and restart the service, and the new configuration should be applied
$ sudo systemctl restart sen2agri-demmaccs.service

I now get multiple dmworkers to process more tiles in parallel.