Performance APIM Distribution

Package for all scripts

License

License

Categories

Categories

Distribution Build Tools ORM Data
GroupId

GroupId

org.wso2.performance.apim
ArtifactId

ArtifactId

performance-apim-distribution
Last Version

Last Version

0.1.0
Release Date

Release Date

Type

Type

pom
Description

Description

Performance APIM Distribution
Package for all scripts
Project Organization

Project Organization

WSO2

Download performance-apim-distribution

How to add to project

<!-- https://jarcasting.com/artifacts/org.wso2.performance.apim/performance-apim-distribution/ -->
<dependency>
    <groupId>org.wso2.performance.apim</groupId>
    <artifactId>performance-apim-distribution</artifactId>
    <version>0.1.0</version>
    <type>pom</type>
</dependency>
// https://jarcasting.com/artifacts/org.wso2.performance.apim/performance-apim-distribution/
implementation 'org.wso2.performance.apim:performance-apim-distribution:0.1.0'
// https://jarcasting.com/artifacts/org.wso2.performance.apim/performance-apim-distribution/
implementation ("org.wso2.performance.apim:performance-apim-distribution:0.1.0")
'org.wso2.performance.apim:performance-apim-distribution:pom:0.1.0'
<dependency org="org.wso2.performance.apim" name="performance-apim-distribution" rev="0.1.0">
  <artifact name="performance-apim-distribution" type="pom" />
</dependency>
@Grapes(
@Grab(group='org.wso2.performance.apim', module='performance-apim-distribution', version='0.1.0')
)
libraryDependencies += "org.wso2.performance.apim" % "performance-apim-distribution" % "0.1.0"
[org.wso2.performance.apim/performance-apim-distribution "0.1.0"]

Dependencies

There are no dependencies for this project. It is a standalone project that does not depend on any other jars.

Project Modules

There are no modules declared in this project.

Artifacts for WSO2 API Manager and WSO2 API Microgateway Performance Tests


Branch Build Status
master Build Status

This repository has artifacts to be used for WSO2 API Manager Performance Tests.

The distribution directory has the scripts and the Maven project to build the final distribution package to be used for performance tests.

The package (performance-apim-distribution-${version}.tar.gz) built by the distribution maven module is the package required for API Manager performance tests from this repository.

The scripts in this repository depend on the scripts in "performance-common" repository.

Note: The scripts are only compatible with WSO2 API Manager 3.1.0.

Following is the recommended deployment for performance testing All-in-one WSO2 API Manager.

API Manager All-in-one Deployment

Package contents

Following is the tree view of the contents inside distribution package.

ubuntu@server:~$ tree --charset=ascii | sed -e 's/[0-9]\.[0-9]\.[0-9].*\.jar/${version}.jar/g'
.
|-- apim
|   |-- apim-start.sh
|   |-- conf
|   |   |-- datasources
|   |   |   `-- master-datasources.xml
|   |   |-- registry.xml
|   |   `-- user-mgt.xml
|   |-- configure.sh
|   |-- create-api.sh
|   |-- generate-tokens.sh
|   |-- micro-gw
|   |   |-- create-micro-gw.sh
|   |   |-- generate-jwt-tokens.sh
|   |   |-- jwt-generator-${version}.jar
|   |   |-- micro-gw-start.sh
|   |   `-- wso2carbon.jks
|   `-- sqls
|       `-- create-databases.sql
|-- cloudformation
|   |-- cloudformation-common.sh
|   |-- create-template.py
|   |-- download-logs.sh
|   |-- get-wum-updated-wso2-product.sh
|   |-- python-requirements.txt
|   |-- run-micro-gw-performance-tests.sh
|   |-- run-performance-tests.sh
|   `-- templates
|       |-- apim_micro_gw_perf_test_cfn.yaml
|       |-- apim_perf_test_cfn.yaml
|       `-- common_perf_test_cfn.yaml
|-- common
|   `-- common.sh
|-- java
|   `-- install-java.sh
|-- jmeter
|   |-- apimchart.py
|   |-- apim-test.jmx
|   |-- create-charts.py
|   |-- create-comparison-charts.py
|   |-- create-summary-csv.sh
|   |-- create-summary-markdown.py
|   |-- csv-to-markdown-converter.py
|   |-- install-jmeter.sh
|   |-- jmeter-server-start.sh
|   |-- perf-test-common.sh
|   |-- run-micro-gw-performance-tests.sh
|   |-- run-performance-tests.sh
|   |-- templates
|   |   `-- summary.md
|   `-- user.properties
|-- jtl-splitter
|   |-- jtl-splitter-${version}.jar
|   `-- jtl-splitter.sh
|-- netty-service
|   |-- netty-http-echo-service-${version}.jar
|   `-- netty-start.sh
|-- payloads
|   |-- generate-payloads.sh
|   `-- payload-generator-${version}.jar
|-- sar
|   `-- install-sar.sh
`-- setup
    |-- setup-apim-micro-gw.sh
    |-- setup-apim.sh
    |-- setup-common.sh
    |-- setup-jmeter-client.sh
    |-- setup-jmeter.sh
    `-- setup-netty.sh

16 directories, 52 files

Each directory has executable scripts.

This package must be extracted in user home directory of all JMeter nodes and the API Manager node used for the performance tests.

Note: These scripts will work only on Debian based systems like Ubuntu.

See following sections for more details.

Running performance tests on AWS

The performance tests can be run on AWS

Testing WSO2 API Manager Gateway

Use cloudformation/run-performance-tests.sh to run performance tests on WSO2 API Manager Gateway.

ubuntu@server:~$ ./cloudformation/run-performance-tests.sh -h

Usage: 
./cloudformation/run-performance-tests.sh -f <performance_scripts_distribution> [-d <results_dir>] -k <key_file> -n <key_name>
   -j <jmeter_distribution> -o <oracle_jdk_distribution> -g <gcviewer_jar_path>
   -s <stack_name_prefix> -b <s3_bucket_name> -r <s3_bucket_region>
   -J <jmeter_client_ec2_instance_type> -S <jmeter_server_ec2_instance_type>
   -N <netty_ec2_instance_type> 
   -a <wso2am_distribution> -c <mysql_connector_jar> -A <wso2am_ec2_instance_type> -D <wso2am_rds_db_instance_class>
   [-t <number_of_stacks>] [-p <parallel_parameter_option>] [-w <minimum_stack_creation_wait_time>]
   [-h] -- [run_performance_tests_options]

-f: Distribution containing the scripts to run performance tests.
-d: The results directory. Default value is a directory with current time. For example, results-20190124105848.
-k: Amazon EC2 Key File. Amazon EC2 Key Name must match with this file name.
-n: Amazon EC2 Key Name.
-j: Apache JMeter (tgz) distribution.
-o: Oracle JDK distribution.
-g: Path of GCViewer Jar file, which will be used to analyze GC logs.
-s: The Amazon CloudFormation Stack Name Prefix.
-b: Amazon S3 Bucket Name.
-r: Amazon S3 Bucket Region.
-J: Amazon EC2 Instance Type for JMeter Client.
-S: Amazon EC2 Instance Type for JMeter Server.
-N: Amazon EC2 Instance Type for Netty (Backend) Service.
-a: WSO2 API Manager Distribution.
-c: MySQL Connector JAR file.
-A: Amazon EC2 Instance Type for WSO2 API Manager.
-D: Amazon EC2 DB Instance Class for WSO2 API Manager RDS Instance.
-t: Number of stacks to create. Default: 1.
-p: Parameter option of the test script, which will be used to run tests in parallel.
    Default: u. Allowed option characters: ubsm.
-w: The minimum time to wait in minutes before polling for cloudformation stack's CREATE_COMPLETE status.
    Default: 5.
-h: Display this help and exit.

Performance test script options. (run_performance_test_options)

-m: Application heap memory sizes. You can give multiple options to specify multiple heap memory sizes. Allowed suffixes: M, G.
-u: Concurrent Users to test. You can give multiple options to specify multiple users.
-b: Message sizes in bytes. You can give multiple options to specify multiple message sizes.
-s: Backend Sleep Times in milliseconds. You can give multiple options to specify multiple sleep times.
-d: Test Duration in seconds. Default 900.
-w: Warm-up time in seconds. Default 300.
-j: Heap Size of JMeter Server. Allowed suffixes: M, G. Default 4G.
-k: Heap Size of JMeter Client. Allowed suffixes: M, G. Default 2G.
-l: Heap Size of Netty Service. Allowed suffixes: M, G. Default 4G.
-i: Scenario name to to be included. You can give multiple options to filter scenarios.
-e: Scenario name to to be excluded. You can give multiple options to filter scenarios.

Testing WSO2 API Microgateway

Use cloudformation/run-micro-gw-performance-tests.sh to run performance tests on WSO2 API Microgateway.

ubuntu@server:~$ ./cloudformation/run-micro-gw-performance-tests.sh -h

Usage: 
./cloudformation/run-micro-gw-performance-tests.sh -f <performance_scripts_distribution> [-d <results_dir>] -k <key_file> -n <key_name>
   -j <jmeter_distribution> -o <oracle_jdk_distribution> -g <gcviewer_jar_path>
   -s <stack_name_prefix> -b <s3_bucket_name> -r <s3_bucket_region>
   -J <jmeter_client_ec2_instance_type> -S <jmeter_server_ec2_instance_type>
   -N <netty_ec2_instance_type> 
   -a <wso2am_distribution> -c <wso2am_micro_gw_distribution> -A <wso2am_ec2_instance_type>
   [-t <number_of_stacks>] [-p <parallel_parameter_option>] [-w <minimum_stack_creation_wait_time>]
   [-h] -- [run_performance_tests_options]

-f: Distribution containing the scripts to run performance tests.
-d: The results directory. Default value is a directory with current time. For example, results-20190124105955.
-k: Amazon EC2 Key File. Amazon EC2 Key Name must match with this file name.
-n: Amazon EC2 Key Name.
-j: Apache JMeter (tgz) distribution.
-o: Oracle JDK distribution.
-g: Path of GCViewer Jar file, which will be used to analyze GC logs.
-s: The Amazon CloudFormation Stack Name Prefix.
-b: Amazon S3 Bucket Name.
-r: Amazon S3 Bucket Region.
-J: Amazon EC2 Instance Type for JMeter Client.
-S: Amazon EC2 Instance Type for JMeter Server.
-N: Amazon EC2 Instance Type for Netty (Backend) Service.
-a: WSO2 API Manager Distribution.
-c: WSO2 API Microgateway Distribution.
-A: Amazon EC2 Instance Type for WSO2 API Manager.
-t: Number of stacks to create. Default: 1.
-p: Parameter option of the test script, which will be used to run tests in parallel.
    Default: u. Allowed option characters: ubsm.
-w: The minimum time to wait in minutes before polling for cloudformation stack's CREATE_COMPLETE status.
    Default: 5.
-h: Display this help and exit.

Performance test script options. (run_performance_test_options)

-m: Application heap memory sizes. You can give multiple options to specify multiple heap memory sizes. Allowed suffixes: M, G.
-u: Concurrent Users to test. You can give multiple options to specify multiple users.
-b: Message sizes in bytes. You can give multiple options to specify multiple message sizes.
-s: Backend Sleep Times in milliseconds. You can give multiple options to specify multiple sleep times.
-d: Test Duration in seconds. Default 900.
-w: Warm-up time in seconds. Default 300.
-j: Heap Size of JMeter Server. Allowed suffixes: M, G. Default 4G.
-k: Heap Size of JMeter Client. Allowed suffixes: M, G. Default 2G.
-l: Heap Size of Netty Service. Allowed suffixes: M, G. Default 4G.
-c: Number of cpus (--cpus option for docker)
-i: Scenario name to to be included. You can give multiple options to filter scenarios.
-e: Scenario name to to be excluded. You can give multiple options to filter scenarios.

Running performance tests on other enviroments

The scripts can also be used to run performance tests on environments other than AWS.

Following are the high-level steps to run the performance tests.

  • Copy the performance-apim distribution to all servers.
  • Extract the packages in user home directory
  • Use scripts in setup directory to setup each server. Note: setup-common.sh is a common script, which should not be executed directly.
  • Run the WSO2 API Manager Gateway performance tests using jmeter/run-performance-test.sh script in JMeter Client.
  • Run the WSO2 API Microgateway performance tests using jmeter/run-micro-gw-performance-tests.sh script in JMeter Client.
  • Use jmeter/create-summary-csv.sh to generate a summary.csv file from the test results.
  • Use jmeter/create-summary-markdown.py to generate a summary report in markdown format.

License

Copyright 2017 WSO2 Inc. (http://wso2.com)

Licensed under the Apache License, Version 2.0

org.wso2.performance.apim

WSO2

Welcome to the WSO2 source code! For info on working with the WSO2 repositories and contributing code, click the link below.

Versions

Version
0.1.0