Performance Testing Scripts
このページのコンテンツは積極的に維持されておらず、アトラシアンはそのためのいかなるサポートの提供も保証できませんのでご注意ください。さらに、(このページのリンクからアクセスできる) アトラシアンの公開 Maven リポジトリからダウンロードできる性能テストのスクリプトはもうサポートされていません。
このページは情報提供のみを目的としているため、お客様自身の責任でご使用ください。これらのスクリプトの使用よりも、グラインダー・ページを使用した JIRA パフォーマンステストを推奨します。
このページには JIRA インストールで使用負荷をテストするためのスクリプトとヒントが含まれています。
新しい JIRA インストールをセットアップする際、ユーザーがアクセスする前に予測負荷の下でどれだけの性能が出るかを把握するのに役立ちます。リクエスト (または使用) 負荷を生成するスクリプトは弊社の Maven 公開リポジトリ (下記のリンク) で提供しています。これらのスクリプトを使用すると、ボトルネックを取り除くための構成の改善を考慮する必要のある箇所を見つけることができます。
この種のテストは厳密科学ではなく、ここに記載されているツールとプロセスは簡単で設定可能であることがねらいであり、負荷テストを評価するための拡張性のある方法を提供しています。
The performance tests described on this page utilise JMeter. While it is not necessary to know JMeter, briefly reading through the JMeter documentation is recommended as it may help you resolve any JMeter-specific issues.
これは、これらのスクリプトが追加設定なしで代表的なテストを実施するという稀なケースですしかし、これらのスクリプトを設定・拡張することで適切な負荷テストを構築できるはずです。
負荷テスト スクリプトを本番環境の JIRA インストールで使用しないでください!
While we recommend using a copy of your production data for testing usage load, the load testing scripts below will modify data within the targeted JIRA installation! Hence, these scripts should not be used on a production JIRA installation. Instead, use a copy of your production JIRA data on a test JIRA installation.
生産 JIRA インストールでこれらのテストスクリプトを実行した場合のデータの損失とバックアップの復活については、ユーザーが責任を負うものとします。
同様に、パフォーマンスのボトルネック解消のために JIRA インストールを変更する際、そのような変更によってどのような影響があるかを本番環境での実施前にテスト・インストールで評価することは有益です。
Prerequisites
以下の手順を行って下さい。
- JIRA のインストール、管理ユーザーでのセットアップ、実行。スクリプトでは、このユーザーのユーザー名/パスワードの組み合わせを「admin'/'admin」と仮定します。
- It is recommended that you test with a production quality database, such as one listed on the Supported Platforms page. Do not use HSQLDB.
- Apache JMeter(現行バージョン 2.3.4) 高負荷テストを実行する場合は、代わりにアトラシアンの改良バージョンをお使い下さい。(Java 1.6 が必要です。)
- 負荷テストのスクリプトとリソースは公開 Maven リポジトリで入手可能です。ご利用の JIRA のバージョンに最も近いバージョンを選択し、そのディレクトリにある ZIP ファイルか Gzip ファイルをダウンロードしてください。よくわからない場合は、ZIP ファイルをダウンロードしてください。
アーカイブ ファイルの展開にWindows 内蔵の zip 解凍ユーティリティーを使用するとエラーが発生するという問題が報告されています。このような問題が発生した場合、サードパーティー製の圧縮・解凍プログラム (例えば、7-Zip) を使用してパフォーマンステストのファイルを解凍してください。
テストを早く実行したい場合
本ドキュメントの続きを読むのが面倒な場合、以下の主要手順を実行します。
Create the setup testdata:
<jmeter location>/bin/jmeter -n -t jmeter-test-setup.jmx -Jadmin.user=<username> -Jadmin.pass=<password>
固定負荷テストを実行します。
<jmeter location>/bin/jmeter -n -t jmeter-test-fixedload.jmx
このドキュメントの残りの部分は、これらの二つのステップを詳しく説明したものです。
For information on how to use JMeter please refer to the JMeter documentation.
Performance Tests
JIRA パフォーマンステストは、次の2つのテストで構成されています。
- Setup test — runs first and prepares the JIRA installation for a subsequent fixed load test
- Fixed load test — simulates a number of users accessing the JIRA installation.
Setup Test
セットアップ テストでは以下をテストします。
- Creating projects
- ユーザーを作成
- 課題の作成とコメント (オプションで解決も)
セットアップ テストを実行する
After extracting the performance test zip file, change into the performanceTest
directory. From this directory, run the performance setup test:
<jmeter location>/bin/jmeter -n -t jmeter-test-setup.jmx -Jadmin.user=<username> -Jadmin.pass=<password>
where <jmeter.location>
is the base directory of JMeter
If you omit the
-n
switch, JMeter will run as a GUI. You may then start the test from within the GUI.
As seen above with the admin.user
and admin.pass
parameters, JMeter supports -Jparameter=value
command arguments in order to control execution. The following parameters control the setup test execution:
Configuration Control
パラメーター | 既定 | 説明 |
---|---|---|
jira.host | ローカルホスト | JIRA インストールのホスト名やアドレス |
jira.port | 8000 | JIRA インストールを実行しているネットワーク・ポート |
jira.context | / | JIRA ウェブアプリコンテキスト |
admin.user | admin | 管理者のユーザー名 |
admin.pass | admin | 管理者のパスワード |
script.base | . | The location of the performance tests. This should only be set if you run the tests from outside the |
remove.data | false | これを有効にしてスクリプトを実行すると、テストで作成されたユーザーとプロジェクトを削除します。 |
User Control
パラメーター | 既定 | 説明 |
---|---|---|
create.users.enable | true | 対象の JIRA インストールにユーザーを作成します。別の場所で作成されたユーザー既にある場合は、false を使用します。 |
browseissue.max | 250 | JIRA インストールの参照のために作成されるユーザー (別名 「browseissue」 ユーザー) の数 |
createissue.max | 250 | 課題の作成のために作成されるユーザー(別名「createissue」ユーザー)の数 |
editissue.max | 250 | 課題の編集のために作成されるユーザー (別名 「editissue」 ユーザー) の数 |
search.max | 250 | 課題の検索のために作成されるユーザー(別名「search」ユーザー)の数 |
useraction.max | 250 | ユーザー情報の参照のために作成されるユーザー (別名 「useraction」 ユーザー) の数 |
browseissue.groupname | なし | 「browseissue」 ユーザーの所属するグループ。none とするとグループに属しません。 |
createissue.groupname | jira-developers | 「createissue」 ユーザーの所属するグループ。none とするとグループに属しません。 |
editissue.groupname | jira-developers | 「editissue」ユーザーの所属するグループ。none にするとグループに属しません。 |
search.groupname | なし | 「search」ユーザーの所属するグループ。none にするとグループに属しません。 |
useraction.groupname | jira-developers | 「useraction」 ユーザーの所属するグループ。none とするとグループに属しません。 |
Project Control
パラメーター | 既定 | 説明 |
---|---|---|
create.projects.enable | true | プロジェクトを作成します。既存のプロジェクト (既存データにある) を使用したい場合は false とします。 |
project.max | 20 | システム内に作成するプロジェクトの数 |
Issue Control
パラメーター | 既定 | 説明 |
---|---|---|
create.issues.enable | true | 対象の JIRA インストールに課題を作成します。テスト用のサンプル課題を作成したくない場合 false とします。 |
issue.max | 3000 | 作成される課題の数 |
issue.comment.enable | true | 課題に、コメントを追加するかしないかをコントロールします。 |
issue.comment.max | 10 | If |
issue.close | true | 作成された課題を、自動終了するかしないかをコントロールします。 |
issue.close.percentage | 60 | If |
issue.setupload.threads | 10 | 課題の作成のために使用されるスレッドの数 |
issue.setupload.pause | 50 | 課題作成中に発生した各リクエスト間で、シミュレートユーザーが「スリープ」状態になる時間数(ミリ秒単位) |
resource.dir | リソース | CSV データ・リソースを含むディレクトリ。 |
Test Output
目標値の設定を選択すると、 JMeter が動作して以下と同様の出力を取得します。
jmeter -n -t jmeter-test-setup.jmx
Created the tree successfully using jmeter-test-setup.jmx
Starting the test @ Mon Oct 26 23:53:28 CDT 2009 (1256619208435)
Generate Summary Results + 931 in 31.3s = 29.7/s Avg: 26 Min: 13 Max: 3256 Err: 0 (0.00%)
Generate Summary Results + 2948 in 180.0s = 16.4/s Avg: 31 Min: 8 Max: 1162 Err: 0 (0.00%)
Generate Summary Results = 3879 in 211.4s = 18.3/s Avg: 29 Min: 8 Max: 3256 Err: 0 (0.00%)
Generate Summary Results + 5048 in 179.9s = 28.1/s Avg: 44 Min: 7 Max: 936 Err: 0 (0.00%)
Generate Summary Results = 8927 in 391.4s = 22.8/s Avg: 37 Min: 7 Max: 3256 Err: 0 (0.00%)
Generate Summary Results + 3114 in 180.1s = 17.3/s Avg: 41 Min: 7 Max: 805 Err: 0 (0.00%)
Generate Summary Results = 12041 in 571.3s = 21.1/s Avg: 38 Min: 7 Max: 3256 Err: 0 (0.00%)
Generate Summary Results + 4956 in 179.8s = 27.6/s Avg: 45 Min: 7 Max: 1844 Err: 0 (0.00%)
Generate Summary Results = 16997 in 751.4s = 22.6/s Avg: 40 Min: 7 Max: 3256 Err: 0 (0.00%)
Generate Summary Results + 313 in 17.1s = 18.3/s Avg: 37 Min: 7 Max: 165 Err: 0 (0.00%)
Generate Summary Results = 17310 in 768.5s = 22.5/s Avg: 40 Min: 7 Max: 3256 Err: 0 (0.00%)
Tidying up ... @ Tue Oct 27 00:06:17 CDT 2009 (1256619977181)
... end of run
この出力は 3 分毎に更新され、テスト全体のサマリーに加え、直近の作業も表示します。
Result Logs
In addition to this summary data, which is output on the command line, log files are created for both the successful (jmeter-results-setup.jtl
) and unsuccessful (jmeter-assertions-setup.jtl
) results. These log files are saved in JTL format (which is based on XML). There are a number of parsers which will generate graphs from these log files. For more information, see the JMeter wiki page on Log Analysis.
Fixed Load Test
Once the setup test has successfully run, the fixed load test can be run. This test will simulate a number of users accessing the JIRA installation.
このテストでは、テストを実行した場合に行動を微調整するパラメーターを複数使います。デフォルトにより、テストは以下の行動、戦略を使います。
- 複数のユーザーグループが固定時間数を同時実行するため、リクエストを実行している間に各自に多少のずれが生じます。
- 課題の編集 (editissue) ユーザーはプロジェクトを参照し、課題検索を試行します。課題に対しコメント、編集もしくはワークフローの変更を行います。課題に対しコメント、編集もしくはワークフローの変更を行います。
- 「ユーザー行動」ユーザーはフィルターの作成、監視と投票を表示します。
- 「課題の参照」 (browseissue) ユーザーはプロジェクトと課題を参照します。
- 「RSS」 ユーザーはプロジェクトを参照し、定期的にプロジェクトの RSS フィードを抜き出します。
- 「課題の作成」 (createissue) ユーザーは新しい課題をインスタンスに追加します。
- 「課題の検索」 (search) ユーザーはクイック サーチ テキストボックスを使用して課題を検索します。
There is no execution of JavaScript by the JMeter client. JavaScript performance will depend on several factors such as your browser and workstation speed. JMeter does not measure this.
固定負荷テストを実行する
<jmeter location>/bin/jmeter -n -t jmeter-test-fixedload.jmx
As with the setup test (above), this command will run the fixed load test with the default values. Similarly, it is possible to control the execution of JMeter with -J
parameters. The fixed load test has the following available parameters:
Configuration Control
パラメーター | 既定 | 説明 |
---|---|---|
jira.host | ローカルホスト | JIRA インストールのホスト名やアドレス |
jira.port | 8000 | JIRA インストールを実行しているネットワーク・ポート |
jira.context | / | JIRA ウェブアプリコンテキスト |
admin.user | admin | 管理者のユーザー名 |
admin.pass | admin | 管理者のパスワード |
script.base | . | The location of the performance tests. This should only be set if you run the tests from outside the |
script.runtime | 1800 | (数秒で) 実行する時間数 |
resource.dir | リソース | リソース CSV ファイルを含むサブディレクトリ。バックエンドのデータをカスタムしたい場合、このパラメータを置き換えます。 |
課題の編集
パラメーター | 既定 | 説明 |
---|---|---|
editissue.threads | 5 | シミュレートする同時「課題の編集」ユーザーの数 |
editissue.pause | 15000 | 「課題の編集」 ユーザー同士のリクエストの待ち時間 (ミリ秒)。 |
workflow.matchname | (クローズ | 解決) | 実行するワークフローに合致する正規表現。 |
editworkflow.percentage | 20 | 課題のワークフローの編集を試みる「課題の編集」のユーザー・リクエストの割合。 |
addcomment.percentage | 60 | 課題へのコメント追加を試みる「課題の編集」リクエストのパーセンテージ |
editissue.percentage | 20 | 課題の編集を試行する「課題の編集」ユーザーリクエストのパーセンテージ |
editissue.issuestoown | 5 | テストが 「課題の編集」 ユーザーに割り当てようとする課題の数。 |
User Actions
パラメーター | 既定 | 説明 |
---|---|---|
useraction.threads | 1 | シミュレートする同時「ユーザー行動」ユーザーの数 |
useraction.pause | 40000 | 「ユーザー行動」ユーザー同士のリクエストの待ち時間 (ミリ秒単位) |
createfilter.percentage | 10 | フィルター作成を試みる「ユーザー行動」ユーザーリクエストのパーセンテージ |
viewwatches.percentage | 10 | 「監視表示」を試行する「ユーザー行動」ユーザーリクエストのパーセンテージ |
viewvotes.percentage | 10 | 「ユーザー行動」 ユーザーが投票を参照しようとするリクエストの割合。 |
Browse Issues and Projects
パラメーター | 既定 | 説明 |
---|---|---|
browseissue.threads | 40 | シミュレートする同時「課題の参照」ユーザーの数 |
browseissue.pause | 3000 | 「課題の参照」ユーザー同士のリクエストの待ち時間 (ミリ秒単位) |
userprofile.percentage | 10 | ユーザープロファイルの参照を試行する「課題の参照」ユーザーリクエストのパーセンテージ |
browsedashboard.percentage | 20 | ダッシュボードの参照を試みる「課題の参照」ユーザーリクエストのパーセンテージ |
dashboard.category | allprojects | プロジェクトステータスガジェットリクエストに対応するプロジェクトカテゴリー |
RSS
パラメーター | 既定 | 説明 |
---|---|---|
browserss.threads | 10 | シミュレートする同時「RSS」ユーザーの数 |
browserss.pause | 60000 | 「RSS」 ユーザー同士のリクエストの待ち時間 (ミリ秒)。 |
課題の作成
パラメーター | 既定 | 説明 |
---|---|---|
issue.create.threads | 3 | シミュレートする同時「課題の作成」ユーザーの数 |
issue.create.pause | 15000 | 「課題の作成」の各ユーザー・リクエスト間の待ち時間 (ミリ秒)。 |
issue.comment.max | 2 | 課題に対するコメントの最大数。実際の数は、0 とこの値の間からランダムに選ばれます。 |
Search For Issues
パラメーター | 既定 | 説明 |
---|---|---|
search.threads | 2 | 「検索」 ユーザーが同時にシミュレートされる数。 |
search.pause | 15000 | 「検索」 ユーザー同士のリクエストの待ち時間 (ミリ秒)。 |
Test Output
目標値の設定を選択すると、 JMeter が動作して以下と同様の出力を取得します。
jmeter -n -t jmeter-test-fixedload.jmx
Created the tree successfully using jmeter-test-fixedload.jmx
Starting the test @ Wed Oct 28 01:13:22 CDT 2009 (1256710402435)
Waiting for possible shutdown message on port 4445
Generate Summary Results + 568 in 97.9s = 5.8/s Avg: 62 Min: 1 Max: 1534 Err: 0 (0.00%)
Generate Summary Results + 3861 in 179.4s = 21.5/s Avg: 39 Min: 0 Max: 494 Err: 0 (0.00%)
Generate Summary Results = 4429 in 277.4s = 16.0/s Avg: 42 Min: 0 Max: 1534 Err: 0 (0.00%)
Generate Summary Results + 7356 in 180.0s = 40.9/s Avg: 37 Min: 0 Max: 481 Err: 0 (0.00%)
Generate Summary Results = 11785 in 457.3s = 25.8/s Avg: 39 Min: 0 Max: 1534 Err: 0 (0.00%)
Generate Summary Results + 10841 in 180.1s = 60.2/s Avg: 38 Min: 0 Max: 995 Err: 0 (0.00%)
Generate Summary Results = 22626 in 637.4s = 35.5/s Avg: 39 Min: 0 Max: 1534 Err: 0 (0.00%)
Generate Summary Results + 11821 in 180.3s = 65.6/s Avg: 37 Min: 0 Max: 507 Err: 0 (0.00%)
Generate Summary Results = 34447 in 817.3s = 42.1/s Avg: 38 Min: 0 Max: 1534 Err: 0 (0.00%)
Generate Summary Results + 11904 in 180.9s = 65.8/s Avg: 38 Min: 0 Max: 658 Err: 0 (0.00%)
Generate Summary Results = 46351 in 997.4s = 46.5/s Avg: 38 Min: 0 Max: 1534 Err: 0 (0.00%)
Generate Summary Results + 11697 in 180.3s = 64.9/s Avg: 38 Min: 0 Max: 488 Err: 0 (0.00%)
Generate Summary Results = 58048 in 1177.4s= 49.3/s Avg: 38 Min: 0 Max: 1534 Err: 0 (0.00%)
Generate Summary Results + 11731 in 180.0s = 65.2/s Avg: 39 Min: 0 Max: 810 Err: 0 (0.00%)
Generate Summary Results = 69779 in 1357.4s= 51.4/s Avg: 38 Min: 0 Max: 1534 Err: 0 (0.00%)
Generate Summary Results + 11646 in 180.0s = 64.7/s Avg: 39 Min: 0 Max: 776 Err: 0 (0.00%)
Generate Summary Results = 81425 in 1537.4s= 53.0/s Avg: 38 Min: 0 Max: 1534 Err: 0 (0.00%)
Generate Summary Results + 11810 in 180.0s = 65.6/s Avg: 39 Min: 0 Max: 798 Err: 0 (0.00%)
Generate Summary Results = 93235 in 1717.3s= 54.3/s Avg: 38 Min: 0 Max: 1534 Err: 0 (0.00%)
Generate Summary Results + 5453 in 109.1s = 50.0/s Avg: 42 Min: 0 Max: 858 Err: 0 (0.00%)
Generate Summary Results = 98688 in 1826.4s= 54.0/s Avg: 39 Min: 0 Max: 1534 Err: 0 (0.00%)
Tidying up ... @ Wed Oct 28 01:43:49 CDT 2009 (1256712229128)
... end of run
この出力は 3 分毎に更新され、テスト全体のサマリーに加え、直近の作業も表示します。
Result Logs
As above, there will be output on the command line and log files will be created for both the successful (jmeter-results-setup.jtl
) and unsuccessful (jmeter-assertions-setup.jtl
) results. These log files are saved in the JTL format (based on XML). There are a number of parsers which will generate graphs from these logs files. For more information, see the JMeter wiki page on Log Analysis.