Uploaded image for project: 'Jira Data Center'
  1. Jira Data Center
  2. JRASERVER-38136

JIRA performance degrades when a large number of security levels are used

      NOTE: This bug report is for JIRA Server. Using JIRA Cloud? See the corresponding bug report.

      Summary

      When a JIRA Instance has many Security Levels the performance of JIRA can degrade significantly.

      Steps to Reproduce

      1. Configure an environment with many Projects and Issue Security Configuration.
      2. Observe a degradation of performance on the instance.
      3. Thread dumps from an affected JIRA instance may indicate many threads showing a stack traces involving IssueSecurity.

      Expected Results

      JIRA should remain performant and cope with the scale in issues or issue security.

      Actual Results

      JIRA becomes unresponsive with large numbers of issue security levels configured.

      Notes

      Configuring Issue level Security currently indicates thar setting more than 10 issue security levels can impact performance in JIRA.

      Workaround

      1. Run the following SQL to check the number of security level:
        select scheme, count(security) from schemeissuesecurities group by scheme;
        scheme | count
        --------+-------
          10000 |  1279
          10030 |    3
          ...
        (7 rows)
      2. Reduce the issue security levels.
      3. Reduce the number of groups using in each level.

            [JRASERVER-38136] JIRA performance degrades when a large number of security levels are used

            AMAZING WORK! ABSOLUTELY AMAZING!!!

            JIRA here is about 10x faster now! You my friend deserve a major raise!

            High five!

            Michael Barton added a comment - AMAZING WORK! ABSOLUTELY AMAZING!!! JIRA here is about 10x faster now! You my friend deserve a major raise! High five!

            ed letifov
            1) The ability to mitigate this is already present in the shipped version since JIRA version 6.2.5.
            2) The size is linear with respect to the number of entries in the "schemeissuesecurities" table, which is a combination of the size of levels/projects/etc but not a direct product, so should be greater that that. Making it very big will not hurt, as it will only grow to the size required. The new code has a different strategy for sizing and expiration which should scale without problems.

            Trevor Campbell (Inactive) added a comment - ed letifov 1) The ability to mitigate this is already present in the shipped version since JIRA version 6.2.5. 2) The size is linear with respect to the number of entries in the "schemeissuesecurities" table, which is a combination of the size of levels/projects/etc but not a direct product, so should be greater that that. Making it very big will not hurt, as it will only grow to the size required. The new code has a different strategy for sizing and expiration which should scale without problems.

            Trevor, can you please confirm:
            1) that the ability to mitigate via cache size change in the file is the change currently to scheduled to be available in 7.0.10 (as per fix versions) as opposed to something that already exists in versions before that
            2) that the dependency between mitigating cache size and the number of security levels is indeed linear? should the size be greater that TOTAL number of security levels in the instance or is this per project? During the initial investigation of the issue we've reported via support ticket someone mentioned that the actual dependency is "number of levels" x "number of projects" x "number of users" or something similar i.e. exponential and unrealistic with big number of users AND levels AND projects hence the "not more than 10 levels please" limitation. Can you please confirm that this is not the case with the new code?

            Ed Letifov [TechTime - New Zealand] added a comment - Trevor, can you please confirm: 1) that the ability to mitigate via cache size change in the file is the change currently to scheduled to be available in 7.0.10 (as per fix versions) as opposed to something that already exists in versions before that 2) that the dependency between mitigating cache size and the number of security levels is indeed linear? should the size be greater that TOTAL number of security levels in the instance or is this per project? During the initial investigation of the issue we've reported via support ticket someone mentioned that the actual dependency is "number of levels" x "number of projects" x "number of users" or something similar i.e. exponential and unrealistic with big number of users AND levels AND projects hence the "not more than 10 levels please" limitation. Can you please confirm that this is not the case with the new code?

            This can be mitigated by setting the value

            jira.security.level.permission.cache.max.size = 10000
            

            in the jira-config.properties in the jirahome directory. You may need to create the file if it does not already exist. You will need to restart JIRA for this to take effect.

            The size to b set should be greater than the number of issue security levels.

            Trevor Campbell (Inactive) added a comment - This can be mitigated by setting the value jira.security.level.permission.cache.max.size = 10000 in the jira-config.properties in the jirahome directory. You may need to create the file if it does not already exist. You will need to restart JIRA for this to take effect. The size to b set should be greater than the number of issue security levels.

            The root cause seems related to the limit placed on the size of the issue security cache.

            Trevor Campbell (Inactive) added a comment - The root cause seems related to the limit placed on the size of the issue security cache.

            No it's not fixed.

            Ed Letifov [TechTime - New Zealand] added a comment - No it's not fixed.

            vkharisma added a comment -

            gtanczyk is this fixed in jira 6.4 ?

            vkharisma added a comment - gtanczyk is this fixed in jira 6.4 ?

              ohernandez@atlassian.com Oswaldo Hernandez (Inactive)
              gtanczyk Grzegorz Tanczyk (Inactive)
              Affected customers:
              10 This affects my team
              Watchers:
              23 Start watching this issue

                Created:
                Updated:
                Resolved: