Skip to main content

Concurrent Processes for Script-Based and Offline Scans

You can adjust concurrency for script-based and offline scans to improve their performance. To do this:

  1. On your Key Manager Servers, find a line like the following from /opt/sshmgr/bin/runcelery:

    exec /opt/sshmgr/.runtime/bin/python3 /opt/sshmgr-runtime/bin/celery \
    `echo $CELERY_DEBUG` \
    -A msg_queue.celery.app worker \
    -n celery@%h \
    -Ofair -B

    Add a --concurrency option to specify the maximum concurrent processes, for example:

    exec /opt/sshmgr/.runtime/bin/python3 /opt/sshmgr-runtime/bin/celery \
    `echo $CELERY_DEBUG` \
    -A msg_queue.celery.app worker \
    -n celery@%h \
    -Ofair -B \
    --concurrency 32

    Similarly, find a line like the following from /opt/sshmgr/bin/runhiscelery:

    exec python3 /opt/sshmgr-runtime/bin/celery \
    `echo $CELERY_DEBUG` \
    -A hscelery.app worker \
    -n hiscelery@%h \
    -Ofair -B

    And once again add a --concurrency option to specify the maximum concurrent processes, for example:

    exec python3 /opt/sshmgr-runtime/bin/celery \
    `echo $CELERY_DEBUG` \
    -A hscelery.app worker \
    -n hiscelery@%h \
    -Ofair -B \
    --concurrency 32
    note

    --concurrency should be approximately twice the number of cores on your Key Manager server. You may display the number of cores using the nproc command.

  2. Restart the Key Manager services.

    On front ends:

    # supervisorctl restart frontend:

    And on back ends:

    # supervisorctl restart backend: