|
You will need the following -
Users have reported problems when using the Windows built-in unzip utility. Please use a third party file archiving and extraction program (for example, 7-Zip) to extract these performance tests. |
The test scripts have been updated to work with Confluence 3.4 in version 3.4. Using an older version of the tests will result in errors when running the test.
If you don't want to read the rest of this document, here are the main points:
performanceTest directory that has just been unzipped.Create the test data:
<jmeter location>/bin/jmeter -n -t jmeter-test-setup.jmx -Jspace.zip=<path to a demo space ZIP file> -Jadmin.user=<username> -Jadmin.pass=<password> |
Run the test:
<jmeter location>/bin/jmeter -n -t jmeter-test-fixedload.jmx |
The remainder of this document is just an elaboration of those two steps.
For information on how to use JMeter please refer to the manual |
A known data set is required to run the testing against. By default this is the Confluence demo space (space key = DS) although this can be changed (more on this later). If you decide to use the Confluence demo space, ensure that the group "confluence-users" is able to update content in this space.
The script jmeter-test-setup.jmx is used to:
You should first ensure that you don't already have the demo space (key = DS) on your test instance. Delete it if you do.
Run the script from the performanceTest directory as follows:
<jmeter location>/bin/jmeter -n -t jmeter-test-setup.jmx -Jspace.zip=<path to a space export.zip>-Jadmin.user=<username> -Jadmin.pass=<password> |
Where:
<path to a space export.zip> is the absolute path to the space export zip you want to be used in your testing. For example, the path to demo-site.zip as found in your Confluence distribution or source: <confluence install>/confluence/WEB-INF/classes/com/atlassian/confluence/setup/demo-site.zip<username> and <password> are the username and password for an admin user that is able to create Confluence users and to import spaces.By default the setup process will create 250 users — 50 each of the following formats: tstreader<n>, tstcommentor<n>, tsteditor<n>, tstcreator<n> and tstsearcher<n>. The password for each matches the username.
A typical run of the setup script will only take a few seconds.
You can reverse the effects of the setup script by setting the remove.data parameter to true, e.g.
<jmeter location>/bin/jmeter -n -t jmeter-test-setup.jmx -Jremove.data=true -Jadmin.user=<username> -Jadmin.pass=<password> |
You can modify the behaviour of the setup script via JMeter parameters. These are supplied on the command line in the form -J<parameter name>=<parameter value>.
Parameter | Default | Explanation |
|---|---|---|
script.base | . | The absolute path to the script. Defaults to the current working directory. |
space.zip | N/A | The absolute path to space export zip file to be imported as test data. |
remove.data | false | Run the script in reverse — remove all test data. |
admin.user | admin | The admin user name used to import data and create users. |
admin.pass | admin | The password for the admin user. |
confluence.context | confluence | The confluence webapp context. |
confluence.host | localhost | The address or host name of the test instance. |
confluence.port | 8080 | The port of the test instance. |
space.key | ds | The space key for the space import that will be tested against. |
space.setup | true | Control whether the test space will be created (or removed). |
commentor.max | 250 | The number of users to be created for making comments. |
creator.max | 250 | The number of users to be created for adding pages. |
editor.max | 250 | The number of users to be created for editing existing pages. |
reader.max | 250 | The number of users to be created for viewing existing pages. |
searcher.max | 250 | The number of users to be created for performing searches. |
resource.max | 250 | The number of users to be created for downloading site resources. |
attachments.max | 250 | The number of users to be created for downloading attachments. |
On the console you will see no obvious indication of success or otherwise. JMeter will output something similar to this:
Created the tree successfully Starting the test @ Mon Apr 14 17:35:08 EST 2008 (1208158508222) Tidying up ... @ Mon Apr 14 17:35:08 EST 2008 (1208158508928) ... end of run |
The scripts location/results directory will contain the file jmeter-result-setuptest.jtl. There were failures or errors if there are any assertions in this file that have the value true for the failure or error element, e.g.
<assertionResult> <name>Manage Users</name> <failure>true</failure> <error>false</error> <failureMessage>Test failed: URL expected to contain /browseusers.action/</failureMessage> </assertionResult> |
The test script itself will put Confluence under a fixed load. Each thread group will attempt to do a certain amount of work for a prescribed period of time (30 minutes by default). This is by design so that load during test runs can accurately be compared against each other.
Execute the test as follows:
<jmeter location>/bin/jmeter -n -t jmeter-test-fixedload.jmx |
Where:
<scripts location> is the absolute path to where you extracted the scripts e.g. /Users/YourName/Download/performanceTest. This is needed for the script to find its external resources.
The test has a number of parameters to tweak its behaviour but generally speaking it has the rough format of:
Note that there is no execution of JavaScript by the client. Keep this in mind if you use this test to gauge Confluence performance in a production environment.
There is also very little use of permissions in these tests. All data involved is accessible to all of the test users.
You can modify the behaviour of the test script via JMeter parameters. These are supplied on the command line in the form -J<parameter name>=<parameter value>.
Parameter | Default | Explanation |
|---|---|---|
script.base | . | The absolute path to the script. Defaults to the current working directory. |
confluence.context | confluence | The confluence webapp context. |
confluence.host | localhost | The address or host name of the test instance. |
confluence.port | 8080 | The port of the test instance. |
create.page.prefix | Nihilist | The title prefix for any created page e.g. Nihilist00001. |
script.runtime | 1800 | The amount of time the script will run for in seconds. |
Test Thread Parameters
Parameter | Default | Explanation |
|---|---|---|
threads.reader | 15 | Number of readers. |
pause.reader | 2000 | The approximate (within 500ms) millisecond pause between reader repeats. |
threads.searcher | 8 | Number of searchers. |
pause.searcher | 2000 | The approximate (within 500ms) millisecond pause between searcher repeats. |
threads.creator | 3 | Number of page creators. |
pause.creator | 2000 | The approximate (within 500ms) millisecond pause between creator repeats. |
threads.editor | 3 | Number of page editors. |
pause.editor | 2000 | The approximate (within 500ms) millisecond pause between editor repeats. |
threads.commentor | 4 | Number of page commentors. |
pause.commentor | 2000 | The approximate (within 500ms) millisecond pause between commentor repeats. |
In version 3.0 of the tests, it's now possible to control the percentage executions of certain actions. These percentages are defined in the "Thread Details" configuration screen. |
So with the default parameters, you are emulating a load on Confluence of 33 concurrent users who will each be hitting the server approximately every 2 seconds (16 users per second).
23 of these users are read only (searchers or readers) and 10 of them are read/write — 11 read only users per second and 5 read/write users per second.
During the run of the test script Jmeter will output progress to the console of the form:
Created the tree successfully Starting the test @ Fri Apr 18 00:07:39 EST 2008 (1208441259523) Display Summary Results During Run + 462 in 77.6s = 5.9/s Avg: 1564 Min: 18 Max: 33738 Err: 1 (0.22%) Display Summary Results During Run + 1338 in 189.9s = 7.0/s Avg: 3596 Min: 24 Max: 34545 Err: 0 (0.00%) Display Summary Results During Run = 1800 in 257.6s = 7.0/s Avg: 3074 Min: 18 Max: 34545 Err: 1 (0.06%) Display Summary Results During Run + 1046 in 200.9s = 5.2/s Avg: 4529 Min: 40 Max: 50461 Err: 0 (0.00%) Display Summary Results During Run = 2846 in 438.2s = 6.5/s Avg: 3609 Min: 18 Max: 50461 Err: 1 (0.04%) Display Summary Results During Run + 677 in 201.2s = 3.4/s Avg: 6638 Min: 46 Max: 27636 Err: 0 (0.00%) Display Summary Results During Run = 3523 in 618.1s = 5.7/s Avg: 4191 Min: 18 Max: 50461 Err: 1 (0.03%) Display Summary Results During Run + 561 in 197.5s = 2.8/s Avg: 8326 Min: 171 Max: 39494 Err: 0 (0.00%) Display Summary Results During Run = 4084 in 798.3s = 5.1/s Avg: 4759 Min: 18 Max: 50461 Err: 1 (0.02%) Display Summary Results During Run + 555 in 199.2s = 2.8/s Avg: 8247 Min: 160 Max: 45270 Err: 0 (0.00%) Display Summary Results During Run = 4639 in 978.0s = 4.7/s Avg: 5177 Min: 18 Max: 504 |