-
Bug
-
Resolution: Unresolved
-
Low
-
None
-
6.4.14, 7.2.12
-
6.04
-
6
-
Severity 2 - Major
-
4
-
Summary
Method DefaultFieldLayoutManager.getUniqueFieldLayouts might allocate a lot memory during execution while collecting required data, that generates high memory pressure to JVM on large JIRA instances. This might lead to expensive GC and/or OOM events.
Environment
Large JIRA instance
- 1k+ CustomFields
- 100 Field Configurations
Steps to Reproduce
- Trigger the call to com.atlassian.jira.issue.fields.layout.field.DefaultFieldLayoutManager#getUniqueFieldLayouts
- Note that this method is frequently used in many JQL checks as part of DefaultFieldManager.isFieldHidden or FieldClausePermissionChecker.hasPermissionToUseClause
Expected Results
Method will allocate small amount of memory (up to 10MB) or no memory.
Actual Results
Method allocated 100+MB of memory
Notes
- Memory size by uniqueLayouts is driven by 2 factors:
- Size of the list - can be large due the large project list using Field Configurations
- Size of the element - FieldLayoutImpl , eg, in this specific case memory size of FieldLayoutImpl is 4.5MB
Object / Stack Frame |Name| Shallow Heap | Retained Heap | -------------------------------------------------------------------------------------------------------------------------------- key com.atlassian.jira.issue.fields.layout.field.FieldLayoutImpl @ 0x6254a9cb0 | | 48 | 4,485,552 | |- <class> class com.atlassian.jira.issue.fields.layout.field.FieldLayoutImpl @ 0x3d09315c8| | 0 | 0 | |- id java.lang.Long @ 0x5729c4df0 17935 | | 24 | 24 | |- description java.lang.String @ 0x623eeab20 GreenHopper Scrum Story Field Configuration | | 24 | 128 | |- name java.lang.String @ 0x623eeabf0 ProjectA Story Field Configuration | | 24 | 120 | |- genericValue org.ofbiz.core.entity.GenericValue @ 0x623eeac68 | | 56 | 672 | |- fieldLayoutItemByFieldId java.util.HashMap @ 0x62d9b9220 | | 48 | 160,960 | |- fieldLayoutItems java.util.ArrayList @ 0x62ebe0970 | | 24 | 16,056 | --------------------------------------------------------------------------------------------------------------------------------
- mostly contributed by CustomFields (through fieldLayoutItem)
- Problem get more amplified during cache flush events, eg:
JRASERVER-64908, JRASERVER-61166
Workaround
- Reduce number of Field Configurations by deleting unused and reusing existing for another project.
- Reduce number of CustomFields, this will reduce memory footprint for FieldLayoutImpl and also will have other improvements
- relates to
-
JSWSERVER-16130 Performance of findRapidViewsByProject degrades with number of Boards
- Closed
-
JSWSERVER-16185 board-scope-filter executed too many time which leads to performance overhead
- Closed
-
JSWSERVER-19230 REST call lastVisited executes board-scope-filter which leads to performance overhead
- Closed
- mentioned in
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...