Increasing JIRA application memory
Java applications like JIRA Software and Confluence run in a "Java virtual machine" (JVM), instead of directly within an operating system. When started, the Java virtual machine is allocated a certain amount of memory, which it makes available to JIRA applications. By default, Java virtual machines are allocated 64 MB of memory, no matter how many gigabytes of memory your server may actually have available. 64 MB is inadequate for medium to large JIRA application installations, and so this needs to be increased. Seeing OutOfMemoryErrors in the logs is symptomatic of this.
On this page:
Step 1: Diagnosis
Assess root cause
Determine JIRA application usage patterns
Choose > System. Select Troubleshooting and Support > System Info to open the System Info page. Then, scroll down the page to view the Java VM Memory Statistics section, and look at the memory graph during times of peak usage:
This server has been allocated a maximum of 768 MB and a minimum of 256 MB (typically defined in the
setenv script which is executed by running the
start-jira script). If you are trying to see whether your settings are being picked up by JIRA applications, this is where to look. Here, you can see that JIRA applications have reserved 742 MB, or which 190 MB is actually in use. If this JIRA application instance were running out of memory, it would have reserved the maximum available (768 MB), and would be using an amount close to this.
Determine available system memory
From the Close Programs Dialog (Press ctrl-alt-delete), select the Performance tab:
The amount marked Available is the amount in kilobytes you have free to allocate to JIRA applications. On this server, we should allocate at most 214 MB.
cat /proc/meminfo to view the memory usage.
Setting the -Xmx above the available amount on the server runs the risk of OutOfMemoryErrors due to lack of physical memory. If that occurs the system will use swap space, which greatly decreases performance.
As a rule of thumb, if you have fewer than 5000 issues, JIRA applications should run well with the default 768 MB. Granting JIRA applications too much memory can impact performance negatively, so it is best to start with 768 MB, and make modest increases as necessary. As another data point, 40,000 works well with 768 MB to 1 GB.
Step 2: Increase available memory
Windows (starting from .bat file)
Setting properties for Windows services via command line
- Identify the name of the service that JIRA applications are installed as in Windows (
Control Panel > Administrative Tools > Services):
In the above example, the SERVICENAME is:
- Open the command window from
Start > Run > type in 'cmd' > press 'Enter'
binsubdirectory of your JIRA application installation directory (or the
binsubdirectory of your Tomcat installation directory if your are running the JIRA WAR distribution).
For JIRA 5.1 or below:
For JIRA 5.2 or above:
In the above example, it would be
- Click on the
Javatab to see the list of current start-up options:
- Set the maximum memory allocation here
Setting properties for Windows services via the Windows registry
In some versions of Windows, there is no option to add Java variables to the service. In these cases, you must add the properties by viewing the option list in the registry.
- Go to
Start > Run, and run "regedit32.exe".
- Find the Services entry:
HKEY_LOCAL_MACHINE > SOFTWARE > Apache Software Foundation > Procrun 2.0 > JIRA
HKEY_LOCAL_MACHINE > SOFTWARE > Wow6432Node > Apache Software Foundation > Procrun 2.0 > JIRA
- To change existing properties, especially increasing Xmx memory, double-click the appropriate value.
- To change additional properties, double-click options.
- Modify the memory allocations here.
Step 3: Verify your settings
Was this helpful?
Thanks for your feedback!