JIRA メモリの容量を増やす

Java applications like JIRA 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 applications like JIRA. 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 installations, and so this needs to be increased. Seeing OutOfMemoryErrors in the logs is symptomatic of this.

(warning) This page addresses how to increase Heap Space memory. Confirm that you're not receiving Perm Gen or GC Overhead errors.

On this page:

ステップ1: 診断

ここをクリックして展開...

Assess Root Cause

多くの場合、単純にメモリを増やすよりも OutOfMemory エラーの根本原因を確認することが効果的です。「Jira が "OutOfMemoryError Java heap space" によってクラッシュする」の議論をご確認ください。

Determine JIRA usage patterns

To determine the JIRA 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:

(info) 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, this is where to look. Here, you can see that JIRA has reserved 742 MB, or which 190 MB is actually in use. If this JIRA instance were running out of memory, it would have reserved the maximum available (768 MB), and would be using an amount close to this.

利用可能なシステム メモリの決定

Windows の場合

From the Close Programs Dialogue (Press ctrl-alt-delete), select the Performance tab:

(info) The amount marked Available is the amount in kilobytes you have free to allocate to JIRA. On this server we should allocate at most 214 MB.

Linux の場合

cat /proc/meminfo を実行してメモリ使用量を表示します。

サーバーで利用可能な容量を超えて -Xmx を設定すると、物理メモリ不足から OutOfMemoryErrors が発生する可能性があります。これが発生した場合、スワップ容量が使用され、パフォーマンスが大幅に低下します。

ガイダンス

As a rule of thumb, if you have fewer than 5000 issues, JIRA should run well with the default 768 MB. Granting JIRA 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.

ステップ 2: 利用可能なメモリ量を増加させる

Linux

ここをクリックして展開...

Linux インストールでヒープ スペース メモリを増やす方法

  1. <JIRA Installation Directory>/bin (Jira WAR インストールの場合は <Tomcat Installation Directory>/bin) で、setenv.sh ファイルを開きます。
  2. JVM_MINIMUM_MEMORY= および JVM_MAXIMUM_MEMORY= を見つけます。
  3. 前述の「診断」を参照し、適切な値を入力します。

Windows (.batファイルから起動)

ここをクリックして展開...

.bat ファイルから起動する Windows インストールでシステム プロパティを設定する方法

  1. <JIRA Installation Directory>/bin (Jira WAR インストールの場合は <Tomcat Installation Directory>/bin) で、setenv.bat ファイルを開きます。
  2. set JVM_MINIMUM_MEMORY= および set JVM_MAXIMUM_MEMORY= セクションを見つけます。
  3. 前述の「診断」を参照し、適切な値を入力します。

Windows サービス

ここをクリックして展開...

There are two ways to configure system properties when starting Running JIRA as a Service, either via command line or in the Windows Registry.

Windows サービスのプロパティをコマンド ラインから設定する

Windows サービスのプロパティをコマンド ラインから設定する

  1. Identify the name of the service that JIRA is installed as in Windows ( Control Panel > Administrative Tools > Services ):

    (info) In the above example, the SERVICENAME is: JIRA120312230938
  2. Start > Run > type in 'cmd' > press 'Enter' でコマンド ウィンドウを開きます。
  3. cd to the bin subdirectory of your JIRA Installation Directory (or the bin subdirectory of your Tomcat installation directory if your are running the JIRA WAR distribution).
    For Example:

    cd C:\Program Files\Atlassian\JIRA\bin
  4. Jira 5.1 以前の場合:

    tomcat6w //ES//%SERVICENAME%
    

    Jira 5.2 以降の場合:

    tomcat7w //ES//%SERVICENAME%

     

    (info) In the above example, it would be tomcat6w //ES//JIRA120312230938

  5. Java タブをクリックして、現在の起動オプションの一覧を表示します。
  6. ここでメモリの最大割り当て量を設定します。

Windows レジストリで Windows サービスのプロパティを設定する

Windows の一部のバージョンには、Java 変数をサービスに追加するオプションがありません。この場合、レジストリ内のオプション一覧を表示してプロパティを追加する必要があります。

Windows サービスのプロパティを Windows レジストリで設定する方法

  1. Start > Run に移動し、"regedit32.exe" を実行します。
  2. サービス エントリを見つけます:
    32 ビット: HKEY_LOCAL_MACHINE > SOFTWARE > Apache Software Foundation > Procrun 2.0 > JIRA
    64 ビット: HKEY_LOCAL_MACHINE > SOFTWARE > Wow6432Node > Apache Software Foundation > Procrun 2.0 > JIRA
  3. 既存のプロパティを変更する (特に Xmx メモリを増やす) には、適切な値をダブルクリックします。
  4. 追加のプロパティを変更するには、オプションをダブルクリックします。
  5. ここでメモリ割り当てを変更します。

ステップ3: 設定の確認

ここをクリックして展開...

設定した内容を確認するには、<JIRA Home Directory>/logs/atlassian-jira.log または catalina.out ファイルを確認します。起動部分のセクションは次のようになっています。

JVM Input Arguments : -Djava.util.logging.config.file=/usr/local/jira/conf/logging.properties -XX:MaxPermSize=256m -Xms256m -Xmx384m -Djava.awt.headless=true -Datlassian.standalone=JIRA -Dorg.apache.jasper.runtime.BodyContentImpl.LIMIT_BUFFER=true -Dmail.mime.decodeparameters=true -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.endorsed.dirs=/usr/local/jira/endorsed -Dcatalina.base=/usr/local/jira -Dcatalina.home=/usr/local/jira -Djava.io.tmpdir=/usr/local/jira/temp

(info) Xmx (最大) および Xms (最小) 設定を探します。

This display is also available by Viewing your System Information.

最終更新日: 2013 年 2 月 25 日

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.