Uploaded image for project: 'Jira Service Management Data Center'
  1. Jira Service Management Data Center
  2. JSDSERVER-8502

SdSerialisedOffThreadProcessor thread pool is fixed to 5 threads and cannot be increased

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Low Low
    • 4.19.0, 4.20.0, 4.13.10, 4.18.2
    • 4.9.0
    • SLA
    • None

      Issue Summary

      When the sd.internal.base.db.backed.completion.events.enabled dark feature is enabled, JSM uses the "DB backed" off thread system. The thread pool used to consume events added to PSMQ is named SdSerialisedOffThreadProcessor-n

      This pool is fixed to a size of 5, which breaks scaling message consumption when this pool type is in effect.

      Customers who have a significant amount of issue events (update/comment etc) could  find that this fixed pool size is not enough to consume events more than they are added, leading to an infinite build up of the AO_319474_MESSAGE table

      Steps to Reproduce

      1. Set Dark Feature sd.internal.base.db.backed.completion.events.enabled 
      2. Put load onto Jira
      3. Note that the thread pool is fixed to 5
      4. Setting the defined workaround to increase the SdOffThreadEventJobRunner pool size, sd.event.processing.async.thread.pool.count has no effect

      Expected Results

      It's not clear. If we expect the previous workaround to take effect, the workaround should result in.

      If not, then, we should add a new property to define the pool size - preferably, one that does not require DB manipulation.

      Actual Results

      The pool size is fixed and does not grow

      Workaround

      It is not possible to increase the SdSerialisedOffThreadProcessor pool size.

      The only options are to either:

      • Go back to the deadlock risk SdOffThreadEventJobRunner pool, by removing the dark feature internal.base.db.backed.completion.events.enabled
      • Disable off-threading completely by setting dark features
        sd.internal.bounded.off.thread.on.completion.events.disabled
        sd.internal.base.off.thread.on.completion.events.disabled
        

       

          Form Name

            [JSDSERVER-8502] SdSerialisedOffThreadProcessor thread pool is fixed to 5 threads and cannot be increased

            Awesome, thanks for confirming!

            Alex [Atlassian,PSE] added a comment - Awesome, thanks for confirming!

            Hi Alex,

            I've backported this to 4.13.x and 4.18.x as well.

            Dominic Brodowski added a comment - Hi Alex, I've backported this to 4.13.x and 4.18.x as well.

            Hi Alex,

            • Yes, the query (queries) to change sd.event.processing.serialised.thread.pool.count is exactly the same.
            • I mentioned re-enabling that feature because the workaround suggested removing the dark feature for the time being and falling back to the older thread pool. I was saying that if someone has done that, they would now be able to re-enable the feature. Otherwise they can just set the sd.event.processing.serialised.thread.pool.count value in the DB.

            Dominic Brodowski added a comment - Hi Alex, Yes, the query (queries) to change sd.event.processing.serialised.thread.pool.count is exactly the same. I mentioned re-enabling that feature because the workaround suggested removing the dark feature for the time being and falling back to the older thread pool. I was saying that if someone has done that, they would now be able to re-enable the feature. Otherwise they can just set the sd.event.processing.serialised.thread.pool.count value in the DB.

            Thanks for quickly triaging this a06a9964b472 . Could I plese ask

            • Is the query to change sd.event.processing.serialised.thread.pool.count the same as "sd.event.processing.async.thread.pool.count" ?
            • You mention re-enabling sd.internal.base.db.backed.completion.events.enabled . Why should we do that? It is removed automatically for customers who have it when upgrade to 4.19.0?

            Alex [Atlassian,PSE] added a comment - Thanks for quickly triaging this a06a9964b472 . Could I plese ask Is the query to change sd.event.processing.serialised.thread.pool.count the same as " sd.event.processing.async.thread.pool.count " ? You mention re-enabling sd.internal.base.db.backed.completion.events.enabled . Why should we do that? It is removed automatically for customers who have it when upgrade to 4.19.0?

            The SdSerialisedOffThreadProcessor thread pool, in order to not conflict with the SdOffThreadJobRunner thread pool name, has its own database setting "sd.event.processing.serialised.thread.pool.count" that is different from the previous "sd.event.processing.async.thread.pool.count" setting, as of 4.19.0.

            Therefore, as of 4.19.0 you should be able to set this value in the database, re-enable the internal.base.db.backed.completion.events.enabled dark feature, and restart the service desk instance to be able to set the number of threads in the thread pool.

            Dominic Brodowski added a comment - The SdSerialisedOffThreadProcessor thread pool, in order to not conflict with the SdOffThreadJobRunner thread pool name, has its own database setting "sd.event.processing.serialised.thread.pool.count" that is different from the previous " sd.event.processing.async.thread.pool.count " setting, as of 4.19.0. Therefore, as of 4.19.0 you should be able to set this value in the database, re-enable the  internal.base.db.backed.completion.events.enabled dark feature, and restart the service desk instance to be able to set the number of threads in the thread pool.

              a06a9964b472 Dominic Brodowski
              allewellyn@atlassian.com Alex [Atlassian,PSE]
              Affected customers:
              1 This affects my team
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: