On a production system, it is a good idea to check if you have enough free memory in JIRA's Java process before installing Structure (any other plugin too).
Assessing Available Memory
- Open menu Administration | Troubleshooting and Support | System Info and scroll down to Java VM Memory Statistics.
- Click Force Garbage Collection
- Note the free % number of the Memory Graph (heap memory).
- Note the absolute amount of Free PermGen Memory (non-heap memory for Java classes).
% of Free Heap Memory
25% – 50%
Free PermGen Memory (prior to Java 8)
100 – 200 MB
If you run JIRA on Java 8, PermGen memory is not a factor.
All recommendations are for a general case and do not guarantee that you don't get
OutOfMemoryError. Individual cases may vary.
Heap Memory Requirements
It is recommended that % of free heap memory is from 25% to 50%.
Structure requires about additional 100 MB of heap memory. You can take your current statistic of Used Memory and Total Memory, add 100 MB to the Used Memory and calculate the recommended value for the Total Memory.
If you already have recommended % of free memory, you can just increase total heap memory by 200 MB.
PermGen Memory Requirements
This section applies to JIRA running on Sun/Oracle Hotspot Java VM only.
PermGen space is used for Java classes and may be depleted if you uninstall, install or upgrade plugins frequently, or if you don't restart JIRA over a long period of time. Due to technical reasons PermGen space might not get cleaned up from the obsolete classes and you may end up with
OutOfMemoryError: PermGen space error.
Structure classes use only about 10 MB of PermGen space. But for the reasons just mentioned, it is good to have a safety margin with a free PermGen space of at least 100 MB.
Changing Memory Parameters
To change memory parameters, edit
setenv.sh (on Windows,
To change maximum amount of Heap space, edit
JVM_MAXIMUM_MEMORYparameter near the top of the script.
To change maximum amount of PermGen space, edit
JIRA_MAX_PERM_SIZE=256mline. Alternatively, you can add
JVM_SUPPORT_RECOMMENDED_ARGS, for example:
You need to restart JIRA for these settings to take effect.
Use 64-Bit Java
It is imperative to use 64-bit Java when allocating large amount of memory to it (1 GB and more). To check if you're running 64-bit Java, look up Java VM parameter on the System Info page.
Physical Memory Requirements
Avoid swapping at all costs!
The amount of physical memory should be enough to accommodate the whole heap and non-heap memory. If you have other Java or memory-intensive applications running on the same host, they all should fit in physical memory, plus you need to reserve at least 1 GB for operating system, services and file cache.
Do not allocate more memory to JIRA if it cannot fit into physical memory! If Java running JIRA starts swapping actively used memory, it will be a performance disaster.
Sample calculations for a host running JIRA and Confluence, with Apache and MySQL:
Heap: 2 GB
Heap: 2 GB
Free memory margin / File buffers
Total Physical Memory Required