JProfiler and JMeter Tools are used to perform load tests for WSO2 Governance Registry.
To configure JProfiler in Non GUI mode:
After creating a JProfiler session, it is necessary to create triggers to get the snapshots saved from time to time. These snapshots can be analyzed after completing the tests. Use the following steps to add a trigger in JProfiler. Please note that you have to be using JProfiler7, which is the latest version currently available.
- In the Session Settings window, go to Triggers Settings.
- Click the Add Trigger button. The Create Trigger dialog box appears.
- Choose Timer as the Tigger Type and click the Next button.
- There you can configure the timer. The timer intervals are defined as 2 minutes.
- Click the Next button.
- You can define the action in the screen that displays. Click on Add Action button and choose Save Snapshot.
- Click the Ok button to proceed.
- Enter the snapshot file name and select the “add a unique number to the snapshot file name” checkbox.
- Then you can finish the Trigger Wizard.
- After completing the JProfiler Session settings, open the .JProfiler7/config.xml file and find the relevant Session ID.
- If you are using remote profiling, copy the local .JProfiler7/config.xml file into the remote .profiler7 folder.
After setting the above configurations, add the following line into the wso2server.sh file:
Once the server is started, the snapshot file is stored under server home.
If you are unable to use JProfiler, you can use Jmap to measure the heap size. The following command can be used to save the heap dump:
To deploy load test service:
- Download the load test project and build it [http://people.wso2.com/~chandana/org.wso2.carbon.governace.loadtest/].
- Place the load test JAR file into the
- Once the Governance Registry server is started, the LoadTestServcie is deployed.
- Using the deployed LoadTestServcie we can perform the following operations:
Database size measuring script:
Once a relevant number of services are deployed into the database, the database size can be measured using the following script.
Note that this script is for MySQL database.
Load Test Steps:
- Start the Governance Registry server instance.
- Add the following number of services: 10,50,100, 500,1000, 3000, 5000, 10000 into the Governance Registry instance using JMeter script (G-Reg Load Test - Pre.jmx) [http://people.wso2.com/~chandana/Jmeter%20Script/].
- Reduce the indexing start time to 60 seconds and keep the system idle for 7 minutes after adding the services.
Complete the following tests and measure the execution time (execution time print in the console).
- Database Size
- Add service execution Time
- Time to list all artifacts
- Time to find specific artifact( first 3 tests search 9th position and other test searches 99th position)
- Using Heap dumps measure the heap usage.
For different number of services, change the client concurrency level using the JMeter script and measure the response time for “Search specific service” as mentioned above and analyze the memory using a memory snapshot.
- All calculations can be made using Excel and min, max and average values can be calculated using inbuilt functions
- All graphs are made using ChatGo website.