JIRA Documentation

JIRA 6.3 EAP
JIRA 6.0 Documentation
JIRA 5.2 Documentation
JIRA 5.1 Documentation
More...
 

 

Search the Knowledge Base and Documentation Spaces

You're visiting the JIRA Knowledge Base. Visit the JIRA Knowledge Base Home for an overview.

Skip to end of metadata
Go to start of metadata

Symptoms

if your JIRA installation is running slowly, and you suspect the culprit is database access speed (or you want to rule it out), you can test your database access speed.

Diagnosis

Icon

You will need JDK 1.5 or later.

  1. Download atlassian-log-analysis-0.1.1.jar.

    Icon

    This is a file with a .jar extension. Sometimes IE renames these to .zip. If this is the case, rename the file to .jar; do not unzip the file.

  2. Open a terminal window (in Windows, go to Start >> Run >> type in 'cmd')
  3. Run:

    (info) Note that the use of "\" at the end of the line is the way you can break up a long command line across lines.
    (info) Fill in the arguments above to the tool. Unfortunately we have not built a user interface for this tool. Note the > out.txt makes the output redirect to a file called out.txt - doing this helps remove the time to write to the console from the time measured to the database.

Please note!

Icon

This tool only measures retrieval latency of key JIRA database objects. It does not simulate real life activities such as permission checking that may significantly increase processing time. Thus it is not recommended to use this tool as an overall instance performance estimator.

Example

Here is a sample to run the tool using an MySQL database:

Sample Output

16 Comments

  1. Hi, I tried the same way, I guess it is not working - Can anyone look in to what went wrong?

    java -cp C:\TEMP\atlassian-log-analysis-0.1.1.jar:"C:\Tomcat 5.5\common\lib\ojdbc6.jar" com.atlassian.util.benchmark.JIRASQLPerformance jira4user jira4user
    jdbc:oracle:thin:@localhost:1521:jiradb oracle.jdbc.OracleDriver > out.txt

    Output:

    Exception in thread "main" java.lang.NoClassDefFoundError: com/atlassian/util/be
    nchmark/JIRASQLPerformance
    Caused by: java.lang.ClassNotFoundException: com.atlassian.util.benchmark.JIRASQ
    LPerformance
            at java.net.URLClassLoader$1.run(Unknown Source)
            at java.security.AccessController.doPrivileged(Native Method)
            at java.net.URLClassLoader.findClass(Unknown Source)
            at java.lang.ClassLoader.loadClass(Unknown Source)
            at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
            at java.lang.ClassLoader.loadClass(Unknown Source)
    Could not find the main class: com.atlassian.util.benchmark.JIRASQLPerformance.
     Program will exit.

    C:\Tomcat 5.5\common\lib>jdbc:oracle:thin:@localhost:1521:jiradb oracle.jdbc.Ora
    cleDriver > out.txt
    The filename, directory name, or volume label syntax is incorrect.

    1. This issue has been resolved now as I have got the output.

      Thanks

      1. Hi Yogesh,

        I tried to run JIRASQLPerformance utility and got the same error you reported (see below). Could you please tell me how you resolved the issue?

        C:\Atlassian\JIRA-4.4>java -cp atlassian-log-analysis-0.1.1.jar:/Atlassian/JIRA-
        4.4/lib/mysql-connector-java-5.1.10.jar com.atlassian.util.benchmark.JIRASQLPerf
        ormance jira ********  "jdbc:mysql://localhost/jira41?useUnicode=true&amp
        ;characterEncoding=UTF8" com.mysql.jdbc.Driver
        Exception in thread "main" java.lang.NoClassDefFoundError: com/atlassian/util/be
        nchmark/JIRASQLPerformance
        Caused by: java.lang.ClassNotFoundException: com.atlassian.util.benchmark.JIRASQ
        LPerformance
                at java.net.URLClassLoader$1.run(Unknown Source)
                at java.security.AccessController.doPrivileged(Native Method)
                at java.net.URLClassLoader.findClass(Unknown Source)
                at java.lang.ClassLoader.loadClass(Unknown Source)
                at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
                at java.lang.ClassLoader.loadClass(Unknown Source)
        Could not find the main class: com.atlassian.util.benchmark.JIRASQLPerformance.
         Program will exit.

        I am running JDK 1.6.0_26b03 on Windows 2008 Server R2

        Any help is much appreciated.

        Thanks,

        Enrico

        1. It seems like making sure the class and the classpath are on the same line matters.

          java -classpath ./atlassian-log-analysis-0.1.1.jar:/opt/tomcat/lib/mysql-connector-java-5.1.18-bin.jar com.atlassian.util.benchmark.JIRASQLPerformance \

           

           

  2. Is there a way to configure the database schema to be used?

    I am using a Psotgresql-DB and my tables are not in the default schema (public). When I start the tool I get an error message telling me that the table "jiraissues" could not be found. I think this is due to the tool searching in the default schema instead of the schema where the table actually is.

    As far as I know the connection-URL for Postgresql does not allow to configure the schema to be used.

  3. I'm getting the following exception :

    Exception in thread "main" java.lang.IllegalArgumentException: Cannot iterate over 1000 issues as there are only 437 issues in the database
    at com.atlassian.util.benchmark.JIRASQLPerformance.getTests(JIRASQLPerformance.java:97)
    at com.atlassian.util.benchmark.JIRASQLPerformance.call(JIRASQLPerformance.java:80)
    at com.atlassian.util.benchmark.JIRASQLPerformance.main(JIRASQLPerformance.java:61)

    It seems that the test was built for 1000+ issues. 

    We have less (437) so we were wandering if there is any way to run the test with less issues (may be there is a parameter or somethig we could specify?). 

    Thanks for your help.

  4. When I ran this on my JIRA installation, I got + numbers for retrieve-issue (+34%) and retrieve-workflow(+74%), but - numbers for get-issue(-47%) and get-workflow(-51%). Looking at the code it seems that it is only the 'retrieve' benchmarks that actually test database performance and the 'get' benchmarks are really testing the processing power of the JVM that JIRA is running under, because the 'retrieve's are actually issuing database calls and the 'gets's are just parsing through the metadata returned by the calls.

    I'd be grateful to get someone else's opinion on this.

     

  5. Hi,

    I tried to run JIRASQLPerformance utility and got the following error:

    C:\Atlassian\JIRA-4.4>java -cp atlassian-log-analysis-0.1.1.jar:/Atlassian/JIRA-
    4.4/lib/mysql-connector-java-5.1.10.jar com.atlassian.util.benchmark.JIRASQLPerf
    ormance jira ********  "jdbc:mysql://localhost/jira41?useUnicode=true&amp
    ;characterEncoding=UTF8" com.mysql.jdbc.Driver
    Exception in thread "main" java.lang.NoClassDefFoundError: com/atlassian/util/be
    nchmark/JIRASQLPerformance
    Caused by: java.lang.ClassNotFoundException: com.atlassian.util.benchmark.JIRASQ
    LPerformance
            at java.net.URLClassLoader$1.run(Unknown Source)
            at java.security.AccessController.doPrivileged(Native Method)
            at java.net.URLClassLoader.findClass(Unknown Source)
            at java.lang.ClassLoader.loadClass(Unknown Source)
            at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
            at java.lang.ClassLoader.loadClass(Unknown Source)
    Could not find the main class: com.atlassian.util.benchmark.JIRASQLPerformance.
     Program will exit.

    I am running JDK 1.6.0_26b03 on Windows 2008 Server R2

    Any help is much appreciated.

    Thanks,

    Enrico

     

  6. The syntax of the command line is incorrect. Separator between jars should be ';', not ':'.

    java -cp ./atlassian-log-analysis-0.1.1.jar:/home/idaniel/tools/jdbc_drivers/mysql-connector-java-3.1.12-bin.jar

    should be :

    java -cp ./atlassian-log-analysis-0.1.1.jar;/home/idaniel/tools/jdbc_drivers/mysql-connector-java-3.1.12-bin.jar

     

    Work well for me under windows like this : 

    java -cp ./atlassian-log-analysis-0.1.1.jar;./postgresql-9.2-1002.jdbc4.jar com.atlassian.util.benchmark.JIRASQLPerformance jira jira jdbc:postgresql://srvbdd:5435/asten-jira-2012 ....t

  7. Here is the command that I just wrote and it is returning random characters:

     

    java -cp ./atlassian-log-analysis-0.1.1.jar;./mysql-connector-java-5.1.25-bin.jar \ com.atlassian.util.benchmark.JIRASQLPerformance  jira         jiraadmin         'jdbc:mysql://localhost:3306/icfi?autoReconnect=true&useUnicode=true&characterEncoding=UTF8'         com.mysql.jdbc.Driver         > out.txt

     

    output looks like:

    mysql-connector-java-5.1.25-bin.jar: line 1: PK: command not found ./mysql-connector-java-5.1.25-bin.jar: line 2:npB: command not found ./mysql-connector-java-5.1.25-bin.jar: line 3: syntax error near unexpected token `(' Ô²ÚÃ.Û«Ò¨zÙCeLýÈÚ-java-5.1.25-bin.jar: line 3:mpB                      UKÚ0¾G°¸´+ ß±H½@<3ß7Ïx&Dñ9³®ûµ¢[Ü£GU<                       ¥ëMETA-INF/MANIFEST.MF                           .(?á4FDzîÓÆÛpïOvg½>ú8-pj´ÝXǤEcEñM=\¸`_ÌÒÒ2ãE* ܨLEVV#A¬-[              гá+fÐ\Ù~­P])*Ö´RM7r¦§[bª%&ð28ú².´qÝ                 VHè<YYcE$WÕ9l­Ø ®Awð-Nü¬Iø½<?                                    þ%y¿Úò=t¶Qvî!};|è               fÚXãóyX­)          åñÐT­~Üôä+<Lø6A)üõn:÷Y-ÀIéÃ>ì{¼6%1ðÐØDÖÁË%<¦El$Ît»®Eî                            ³Þçu°è»w¹¢½c®3Më+4o4¹!á.h¿è]-{°¶S ªÕçÔµùûâ-( üm¢íY?ámÁÓ      <­z¥¬§ÞàCþöé¨áUzÒW¯=üÙ_lâ·ÇyP/aoQB·cú~ûXÁ|}ê8¼' [root@ip-10-216-43-53 lib]# PuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTY

     

  8. This page is almost useless if it doesn't give some sample values to compare agains. We need a GREEN / ORANGE / RED values, so we can figure it out if we have to spend weeks tuning the database server or we are just looking in the wrong place.

    The disk speed page contains examples like this, but this one doesn't

  9. We must have sample value to compare our...

    On oracle, i have the following error :

    java.sql.SQLException: Exhausted Resultset
            at oracle.jdbc.driver.OracleResultSetImpl.getString(OracleResultSetImpl.java:1256)
            at com.atlassian.util.benchmark.JIRASQLPerformance$4.call(JIRASQLPerformance.java:178)
            at com.atlassian.util.benchmark.TimedTestRunner.run(TimedTestRunner.java:26)
            at com.atlassian.util.benchmark.Benchmark.run(Benchmark.java:60)
            at com.atlassian.util.benchmark.JIRASQLPerformance.call(JIRASQLPerformance.java:80)
            at com.atlassian.util.benchmark.JIRASQLPerformance.main(JIRASQLPerformance.java:61)

  10. This just came in handy for me, so I thought I would post up what I did. I created a script that I could run over and over to check stats since we are having intermittent issues. The last line will grep for one of the summary lines in all files so I can see a quick comparison.

     

    ;D

     

    out.2014.01.07_09.30.00.txt:retrieve-issue      37,678,841      39,098,000      3,103,000       300,413,000
    out.2014.01.07_09.39.50.txt:retrieve-issue      5,191,422       4,581,000       826,000         32,979,000
    out.2014.01.07_09.45.49.txt:retrieve-issue      4,177,289       3,119,000       1,675,000       233,094,000
    out.2014.01.07_09.46.51.txt:retrieve-issue      2,507,172       1,749,000       814,000         25,464,000
    out.2014.01.07_09.47.43.txt:retrieve-issue      3,253,834       2,126,000       776,000         26,554,000

     

     

  11. How do i interpret the values? Which one are good / bad ?  In the KB Testing Disk Access Speed exists a table about interpreting those values ....

    Can you add a similar table to this article?