Ballerina Performance Analysis

Ballerina-Performance

The Ballerina performance analysis is done with Google Charts API simply for the demonstration purposes only. It compares the throughput, average response time, standard deviation of response time, 99th percentile of response time and error count for 8 different scenarios.

Dashboard: https://ldclakmal.me/ballerina-performance-analysis

The data which is used for this analysis can be found for each of the following Ballerina versions (public and internal releases) in the format of ‘md’ and ‘csv’.

Ballerina Performance Tests with AWS & Jenkins

This guide explains how to execute performance tests for Ballerina using AWS & Jenkins.

Setup

The following steps are only one time configurations. Once all the prerequisites are completed, you can start with the next section.

AWS
  1. Create IAM User in AWS account wso2-rnd-ipaas with proper permissions.
  2. Create S3 bucket in us-east-1 with the name ballerina-performance-artifacts.
  3. Generate an EC2 key pair with the name ballerina_aws and the format of pem and download.
VM
  1. ballerina-performance.key file which is the SSH key file for the WSO2 Jenkins VM 192.168.114.17.
  2. VPN access for connecting to WSO2 Jenkins VM.
  3. Download jdk-8u212-linux-x64.tar.gz at Oracle Archives and SCP to WSO2 Jenkins VM.
      $ scp -i ~/.ssh/ballerina-performance.key jdk-8u212-linux-x64.tar.gz ubuntu@192.168.114.17:/build/software/
    
  4. Download apache-jmeter-5.1.1.tgz at Apache JMeter Archives and SCP to WSO2 Jenkins VM.
      $ scp -i ~/.ssh/ballerina-performance.key apache-jmeter-5.1.1.tgz ubuntu@192.168.114.17:/build/jenkins-home/workspace/ballerina-platform/resources
    
  5. Download ballerina_aws.pem which is created earlier and SCP to WSO2 Jenkins VM.
      $ scp -i ~/.ssh/ballerina-performance.key ballerina_aws.pem ubuntu@192.168.114.17:/home/ubuntu/
      $ scp -i ~/.ssh/ballerina-performance.key ballerina_aws.pem ubuntu@192.168.114.17:/
    
  6. Configure AWS credentials (Access key ID & secret access key) in Jenkins VM.
      $ ssh -i ~/.ssh/ballerina-performance.key ubuntu@192.168.114.17
      $ cd ~/.aws/
      $ vim credentials
    

Let’s Start

  1. There are 2 options to provide the Ballerina Linux installer (.deb) of the required version to be checked.
    1. Download the required Ballerina Linux installer inside the Jenkins VM.
       $ ssh -i ~/.ssh/ballerina-performance.key ubuntu@192.168.114.17
       $ cd /build/jenkins-home/workspace/ballerina-platform/resources
       $ curl -O https://dist.ballerina.io/downloads/<version>/ballerina-linux-installer-x64-<version>.deb
      
    2. SCP the required Ballerina Linux installer to the Jenkins VM.
       $ scp -i ~/.ssh/ballerina-performance.key ballerina-linux-installer-x64-<version>.deb ubuntu@192.168.114.17:/build/jenkins-home/workspace/ballerina-platform/resources
      
  2. Go to https://wso2.org/jenkins/ and login with WSO2 credentials.
  3. Go to https://wso2.org/jenkins/job/ballerina-platform/job/ballerina-performance-execution/ to start the Ballerina performance tests.
  4. Click on “Build with Parameters” on the left side navigation menu and fill the parameters as required.
  5. Click on the “Build” button to start the test job.
Resources
NOTES

References