Uploaded image for project: 'Product Roadmaps'
  1. Product Roadmaps
  2. MMF-950

Capability to launch several Compute Engine Workers must come with the Governance plugin



    • Type: MMF
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Labels:


      A SonarQube instance includes a Web Server, a Compute Engine and an Elastic Search node. Out of the box, a Compute Engine can only consume one project report at a time.

      Provide a property

      The Governance plugin should provide a property to allow configuration of the number of Compute Engine workers to launch. This property must always (MMF-955) be visible and documented on the global Background Tasks page. It must be active only when the Governance plugin is installed. (If the Governance plugin is installed but not licensed, analysis will fail so checking license state is not necessary.)

      • name: CE Workers Per Node
      • description: If your queue backs up behind analysis reports from large projects, increasing the number of Compute Engine workers will allow you to take full advantage of having configured increased Compute Engine memory on a multi-core server (vertical scaling).
      • type: internal property

      This property must be stored in the database and not settable via sonar.conf or any other configuration file.


      This feature may or may not be handled differently with the High Availability module. The functionality described here assumes a single node.

      Default / Minimum

      Because this property is provided by the Governance Pack, it will not be settable without the plugin and should continue to default to 1 when Governance is unavailable.

      Any new configuration value that evaluates to an integer < 1 must return an error to the user. If such a value somehow slips through all the guards and is stored in the database, worker count must automatically reset (in use/memory if not in the DB) to 1. Such a reset must be reflected in ce.log with a message like "Configured worker count 'xxx' is invalid. 1 will be used instead."


      It seems prudent (although slightly paranoid) to set a maximum possible worker count of 10. Any new configuration value that evaluates to an integer >10 should be reset to 10 and return a warning to the user. If a value >10 is somehow stored in the database, worker count must be automatically reset to 10. Such a reset must be reflected in ce.log with a message like "Configured worker count 'xxx' is higher than allowed. 10 will be used instead."

      Start/Stop-ing workers

      Active worker count will be managed dynamically.

      Removal of sonar.properties configuration

      sonar.ce.workerCount will no longer be valid and should be removed from sonar.properties. If this value is present, a warning will be logged that the property is no longer valid, and will be ignored. This warning can be removed in the 7.0 version of SonarQube.

      Out of Scope

      It is out of scope to try to give the user any advice on optimal worker count, such as

      • "You have n cores but only m workers configured,"
      • "Warning: n workers may bog down your m-core server."

      It is also out of scope to calculate any numbers, such as "average queue time/ last 24hrs" which might prompt a user to update her worker count.

      Current design proposition

      In Administration > Projects > Background tasks the user will find the default number of workers clearly stated in the top right corner.
      When the Governance Pack is installed, an edit icon will be available next to it

      When the Governance Pack is not installed, a highly noticeable button will appear to promote it. It wiil link to https://redirect.sonarsource.com/plugins/governance.html

      When clicking on the edit icon, a popup will appear, allowing the user to choose how many workers he wants to add. The dropdown list will be restricted to a maximum of 10.

      Once edited, a warning icon will display info on hover


        1. MMF_950_01_V2.png
          222 kB
        2. MMF_950_01.png
          223 kB
        3. MMF_950_02_V2.png
          217 kB
        4. MMF_950_02.png
          215 kB
        5. MMF_950_03_V2.png
          231 kB
        6. MMF_950_03.png
          231 kB
        7. MMF_950_04_V2.png
          225 kB
        8. MMF_950_04.png
          226 kB

          Issue Links



              ann.campbell.2 Ann Campbell
              freddy.mallet Freddy Mallet (Inactive)
              0 Vote for this issue
              6 Start watching this issue