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 (or any other plugin).
Assessing Available Memory
- Open menu Administration | System | 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 won'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 an 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 the 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 an
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 the maximum amount of Heap space, edit the
JVM_MAXIMUM_MEMORYparameter near the top of the script.
To change the maximum amount of PermGen space, edit the
JIRA_MAX_PERM_SIZE=256mline. Alternatively, you can add the
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 a large amount of memory to it (1 GB and more). To check if you're running 64-bit Java, look up the 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 the 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 severely impact performance.
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