Uploaded image for project: 'Jira Server and Data Center'
  1. Jira Server and Data Center
  2. JRASERVER-68439

Improve FieldCache memory utilisation for Jira instances with large Lucene

    XMLWordPrintable

    Details

    • Type: Suggestion
    • Status: Resolved (View Workflow)
    • Resolution: Fixed
    • Affects Version/s: 6.4.14, 7.2.15, 7.6.7, 7.12.1
    • Fix Version/s: 8.0.0
    • Component/s: JQL
    • Labels:
    • Feedback Policy:
      We collect Jira feedback from various sources, and we evaluate what we've collected when planning our product roadmap. To understand how this piece of feedback will be reviewed, see An updated workflow for server feature suggestions.
    • UIS:
      6

      Description

      Problem Definition

      Lucene uses org.apache.lucene.search.FieldCache to improve sort for text fields.
      Lucene loads corresponding structures from disk into memory and stores in FieldCache.

      That means the bigger the Lucene Fields (including Jira CustomFields) size the more memory will be required for them in JVM heap

      • For large Jira instances (4+ mln issues) FieldCache might use up to 9GB+, which adds extra pressure for the JVM

      Suggested Solution

      Optimize memory usage of the FieldCache.
      According to Lucene docs, those structures are gone in latest versions, so upgrade of Lucene 7+ should fix the problem.

      Jira 8.0 no longer uses field caches to store lucene index parts in Java heap. They migrated this functionality to sth called Doc Values which does exactly the same but does not consume JVM heap space - it's all stored on disk and mmaped into process virtual memory.

      Note

      Related bog
      https://community.developer.atlassian.com/t/where-is-fieldcache-in-jira-8-0/28042

      Workaround

      Since memory usage is proportional to the size of the Lucene Fields, there are a couple of workarounds here, in the order of preference:

      1. Disable Lucene search index for unused CustomFields
      2. Reduce scope for CustomFields (limit for specific projects)

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                ayakovlev@atlassian.com Andriy Yakovlev
              • Votes:
                0 Vote for this issue
                Watchers:
                8 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: