Use jProfiler to analyse Jira application performance

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問

このページの内容は、Jira アプリケーションでサポートされていないプラットフォームに関連しています。したがって、アトラシアンは、そのためのサポートの提供を保証できません 。この資料は情報提供のみを目的としているため、お客様自身の責任でご使用ください。

概要

JIRA applications can experience performance problems from time-to-time, and debugging them can be a fairly complicated task. One of the ways of diagnosing what is taking time for the application to respond is by attaching a profiler to it to give an exact breakdown of the time taken up by each Java Method. This can be done by using a third-party application, jProfiler and will assist in indicating what may be causing performance problems.

Setup

  1. Download and install jProfiler(info) This is a third-party application, and as such is not supported by Atlassian - it is also a paid for product. Please see their  Support section for assistance using it.
  2. Run through the Start Center to setup the JIRA application instance so it can be connected to:
  3. Select 'New Remote Integration' (the instance is on a separate server to where jProfiler is installed) and follow the instructions in the wizard.
  4. Pick the correct version and architecture of the target operating system (OS):
  5. Ensure the correct version of the JVM is selected:
  6. Select the 'Startup immediately, connect later with jProfiler GUI' option:
  7. Enter the Server FQDN (or hostname) of the JIRA application instance - in this example replace jira.example.com with whatever that is:
  8. Specify the location of the jProfiler agent on the target OS. This is required so jProfiler can bind to the target application. If this is the first time the profiling agent has been installed, select the 'Create archive' tickbox and specify a location on the OS where jProfiler is running (not the target OS).
  9. Confirm the download, if downloading the archive.
  10. Copy the archive file and unpack it in the 'Remote installation directory'. For example copy /Users/captainplanet/Downloads/jprofiler_agent_linux-x64.tar.gz and untar it into /opt/jprofiler.
  11. Select the port, ensuring that this is open between the OS jProfiler is running on and the target OS. If unsure check this with your System Administrator / Hosting Provider.
  12. Copy/paste the highlighted JVM arguments from the below page into the appropriate configuration as per Setting Properties and Options on Startup.
  13. Select 'Next' and 'No, I will start the session later.', then Finish.
  14. Restart JIRA application.

Attach

  1. Connect to the created session through 'Open Session' in the 'Start Center'.
  2. Select Sampling, as below:
  3. And then press OK, no other settings need to be done. There will be some minor transformations of classes, please wait for this to finish.
  4. jProfiler will now default to the Memory Views screen, which will give you an indication of which objects are using the most heap space. We'll need to start recording data, so go to CPU Views > Record CPU.
  5. Enable database monitoring - this will show us the time spent for each database query. Do this by doing to Databases > Record> Hotspots.
  6. (Optional): Monitors & Locks recordings can be enabled as per the below, this isn't always needed though. Done in Monitors & Locks > Locking History Graph > Record.
  7. Access the JIRA application page that is taking a long time to load and wait for the page to finish loading. This will provide a breakdown of the time taken for each method to load. Once the page that is slow to perform has finished loading, stop the CPU recording.
  8. Use the Save Snapshot functionality to save a copy of the profile as it may be needed later to provide to Support. 

分析

CPU Views

  1. Change to the Hot Spots mode and expand the top method (this will be the method that's taking the longest), for example
  2. Expanding the methods will provide a breakdown of what exactly is taking the longest for the JVM to respond (this is the virtual machine that powers JIRA).
  3. If jProfiler has been connected to an IDE (for example, IntelliJ), you can right-click on the method and Show Source:


Database Stats

Browse to Databases > JDBC > Hot Spots and review the SQL to see which queries are taking the longest. For example:



サポートに情報を提供する

Atlassian Support may request the output of a jProfiler session - this can be done by generating the breakdown and using the Save Snapshot functionality, as per the Discovery section of this documentation.

最終更新日 2019 年 9 月 25 日

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

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