Akamas Docs
3.5
3.5
  • Home
  • Getting started
    • Introduction
    • Free Trial
    • Licensing
    • Deployment
      • Cloud Hosting
    • Security
    • Maintenance & Support (M&S) Services
      • Customer Support Services
      • Support levels for Customer Support Services
      • Support levels for software versions
      • Support levels with Akamas
  • Installing
    • Architecture
    • Docker compose installation
      • Prerequisites
        • Hardware Requirements
        • Software Requirements
        • Network requirements
      • Install Akamas dependencies
      • Install the Akamas Server
        • Online installation mode
          • Online installation behind a Proxy server
        • Offline installation mode
        • Changing UI Ports
        • Setup HTTPS configuration
      • Troubleshoot Docker installation issues
    • Kubernetes installation
      • Prerequisites
        • Cluster Requirements
        • Software Requirements
      • Install Akamas
        • Online Installation
        • Offline Installation - Private registry
      • Installing on OpenShift
      • Accessing Akamas
      • Useful commands
    • Install the CLI
      • Setup the CLI
      • Initialize the CLI
      • Change CLI configuration
      • Use a proxy server
    • Verify the installation
    • Installing the toolbox
    • Install the license
    • Manage anonymous data collection
  • Managing Akamas
    • Akamas logs
    • Audit logs
    • Upgrade Akamas
      • Docker compose
      • Kubernetes
    • Monitor Akamas status
    • Backup & Recover of the Akamas Server
    • Users management
      • Accessing Keycloak admin console
      • Configure an external identity provider
        • Azure Active Directory
        • Google
      • Limit users sessions
        • Local users
        • Identity provider users
    • Collecting support information
  • Using
    • System
    • Telemetry
    • Workflow
    • Study
      • Offline Study
      • Live Study
        • Analyzing results of live optimization studies
      • Windowing
      • Parameters and constraints
  • Optimization Guides
    • Optimize application costs and resource efficiency
      • Kubernetes microservices
        • Optimize cost of a Kubernetes deployment subject to Horizontal Pod Autoscaler
        • Optimize cost of a Kubernetes microservice while preserving SLOs in production
        • Optimize cost of a Java microservice on Kubernetes while preserving SLOs in production
      • Application runtime
        • Optimizing a sample Java OpenJDK application
        • Optimizing cost of a Node.js application with performance tests
        • Optimizing cost of a Golang application with performance tests
        • Optimizing cost of a .NET application with performance tests
      • Applications running on cloud instances
        • Optimizing a sample application running on AWS
      • Spark applications
        • Optimizing a Spark application
    • Optimize application performance and reliability
      • Kubernetes microservices
        • Optimizing cost of a Kubernetes microservice while preserving SLOs in production
        • Optimizing cost of a Java microservice on Kubernetes while preserving SLOs in production
      • Applications running on cloud instances
      • Spark applications
  • Integrating
    • Integrating Telemetry Providers
      • CSV provider
        • Install CSV provider
        • Create CSV telemetry instances
      • Dynatrace provider
        • Install Dynatrace provider
        • Create Dynatrace telemetry instances
          • Import Key Requests
      • Prometheus provider
        • Install Prometheus provider
        • Create Prometheus telemetry instances
        • CloudWatch Exporter
        • OracleDB Exporter
      • Spark History Server provider
        • Install Spark History Server provider
        • Create Spark History Server telemetry instances
      • NeoLoadWeb provider
        • Install NeoLoadWeb telemetry provider
        • Create NeoLoadWeb telemetry instances
      • LoadRunner Professional provider
        • Install LoadRunner Professional provider
        • Create LoadRunner Professional telemetry instances
      • LoadRunner Enterprise provider
        • Install LoadRunner Enterprise provider
        • Create LoadRunner Enterprise telemetry instances
      • AWS provider
        • Install AWS provider
        • Create AWS telemetry instances
    • Integrating Configuration Management
    • Integrating with pipelines
    • Integrating Load Testing
      • Integrating NeoLoad
      • Integrating LoadRunner Professional
      • Integrating LoadRunner Enterprise
  • Reference
    • Glossary
      • System
      • Component
      • Metric
      • Parameter
      • Component Type
      • Workflow
      • Telemetry Provider
      • Telemetry Instance
      • Optimization Pack
      • Goals & Constraints
      • KPI
      • Optimization Study
      • Workspace
      • Safety Policies
    • Construct templates
      • System template
      • Component template
      • Parameter template
      • Metric template
      • Component Types template
      • Telemetry Provider template
      • Telemetry Instance template
      • Workflows template
      • Study template
        • Goal & Constraints
        • Windowing policy
          • Trim windowing
          • Stability windowing
        • Parameter selection
        • Metric selection
        • Workload selection
        • KPIs
        • Steps
          • Baseline step
          • Bootstrap step
          • Preset step
          • Optimize step
        • Parameter rendering
        • Optimizer Options
    • Workflow Operators
      • General operator arguments
      • Executor Operator
      • FileConfigurator Operator
      • LinuxConfigurator Operator
      • WindowsExecutor Operator
      • WindowsFileConfigurator Operator
      • Sleep Operator
      • OracleExecutor Operator
      • OracleConfigurator Operator
      • SparkSSHSubmit Operator
      • SparkSubmit Operator
      • SparkLivy Operator
      • NeoLoadWeb Operator
      • LoadRunner Operator
      • LoadRunnerEnteprise Operator
    • Telemetry metric mapping
      • Dynatrace metrics mapping
      • Prometheus metrics mapping
      • NeoLoadWeb metrics mapping
      • Spark History Server metrics mapping
      • LoadRunner metrics mapping
    • Optimization Packs
      • Linux optimization pack
        • Amazon Linux
        • Amazon Linux 2
        • Amazon Linux 2022
        • CentOS 7
        • CentOS 8
        • RHEL 7
        • RHEL 8
        • Ubuntu 16.04
        • Ubuntu 18.04
        • Ubuntu 20.04
      • DotNet optimization pack
        • DotNet Core 3.1
      • Java OpenJDK optimization pack
        • Java OpenJDK 8
        • Java OpenJDK 11
        • Java OpenJDK 17
      • OpenJ9 optimization pack
        • IBM J9 VM 6
        • IBM J9 VM 8
        • Eclipse Open J9 11
      • Node JS optimization pack
        • Node JS 18
      • GO optimization pack
        • GO 1
      • Web Application optimization pack
        • Web Application
      • Docker optimization pack
        • Container
      • Kubernetes optimization pack
        • Kubernetes Pod
        • Kubernetes Container
        • Kubernetes Workload
        • Kubernetes Namespace
        • Kubernetes Cluster
      • WebSphere optimization pack
        • WebSphere 8.5
        • WebSphere Liberty ND
      • AWS optimization pack
        • EC2
        • Lambda
      • PostgreSQL optimization pack
        • PostgreSQL 11
        • PostgreSQL 12
      • Cassandra optimization pack
        • Cassandra
      • MySQL Database optimization pack
        • MySQL 8.0
      • Oracle Database optimization pack
        • Oracle Database 12c
        • Oracle Database 18c
        • Oracle Database 19c
        • RDS Oracle Database 11g
        • RDS Oracle Database 12c
      • MongoDB optimization pack
        • MongoDB 4
        • MongoDB 5
      • Elasticsearch optimization pack
        • Elasticsearch 6
      • Spark optimization pack
        • Spark Application 2.2.0
        • Spark Application 2.3.0
        • Spark Application 2.4.0
    • Command Line commands
      • Administration commands
      • User and Workspace management commands
      • Authentication commands
      • Resource management commands
      • Optimizer options commands
    • Release Notes
  • Knowledge Base
    • Creating custom optimization packs
    • Setting up a Konakart environment for testing Akamas
    • Modeling a sample Java-based e-commerce application (Konakart)
    • Optimizing a web application
    • Optimizing a sample Java OpenJ9 application
    • Optimizing a sample Linux system
    • Optimizing a MongoDB server instance
    • Optimizing a Kubernetes application
    • Leveraging Ansible to automate AWS instance management
    • Guidelines for optimizing AWS EC2 instances
    • Optimizing an Oracle Database server instance
    • Optimizing an Oracle Database for an e-commerce service
    • Guidelines for optimizing Oracle RDS
    • Optimizing a MySQL server database running Sysbench
    • Optimizing a MySQL server database running OLTPBench
    • Optimizing a live full-stack deployment (K8s + JVM)
    • Setup Instana integration
Powered by GitBook
On this page
  • Reference Architecture
  • Setup Docker Swarm
  • Setup Konakart
  • Setup JMeter (optional)
  • Setup Prometheus (optional)
  • Explore Grafana dashboards (optional)

Was this helpful?

Export as PDF
  1. Knowledge Base

Setting up a Konakart environment for testing Akamas

Last updated 1 year ago

Was this helpful?

This page describes how to setup a simple yet complete performance testing environment that you can use for running Akamas offline optimization study:

  • The target application is , a real-world Java-based e-commerce application

  • JMeter will be used to execute stress tests, with built-in sample scenarios

  • Prometheus will be used to monitor the environment (load test, JVM and OS metrics)

Reference Architecture

The following picture describes the high-level Akamas architecture that is enabled by this setup.

Setup Docker Swarm

First of all, install Docker on your Linux box:

sudo apt update && sudo apt install docker.io

Now enable the user ubuntu to run docker without sudo:

sudo usermod -aG docker $USER
newgrp docker

In this environment we leverage Docker Swarm, a Docker native container orchestration system. Even though in this scenario everything runs on a single machine, Swarm is handy as it provides the ability to specify container resource limits (e.g. how many CPUs and how much memory the container can use) which can be very useful from a tuning perspective.

At this point, we can initialize Docker Swarm with this simple command:

docker swarm init

You should see a message stating that Docker Swarm has been setup.

You now create a Docker network that all the containers will use to communicate:

docker network create -d overlay --attachable akamas_lab

Setup Konakart

In order to setup Konakart, first clone this repository:

git clone https://github.com/akamaslabs/konakart-docker.git

Now you can start Konakart by running:

docker stack deploy --compose-file konakart-docker/konakart/docker-compose.yml sut

You can now verify that Konakart is up and running by accessing your instance on port 8780:

Setup JMeter (optional)

Unless you plan to use a different load testing tool (such as LoadRunner Enterprise or Neotys NeoLoad), JMeter is a great choice to start using Akamas.

Setting up JMeter is straightforward as a JMeter container comes already configured with test plans built for performance testing Konakart. Moreover, JMeter is already configured with the Prometheus integration so that performance test metrics (e.g. transaction throughput and transaction response time) are collected via Prometheus Listener for JMeter. You just need to verify the ability to launch a performance test in this environment.

You can launch a first manual performance test by running the following command, where you need to replace YOUR_INSTANCE_ADDRESS with the address of your Konakart instance:

docker run --net=akamas_lab --rm --name jmeter -i -v $(pwd)/konakart-docker/jmeter:/tmp -w /tmp -p 9270:9270 chiabre/jmeter_plugins -t ramp_test_plan.jmx -JTARGET_HOST=YOUR_INSTANCE_ADDRESS

You should see an output similar to the one displayed here below, indicating that JMeter is running successfully:

START Running Jmeter on Fri Apr  2 06:35:35 UTC 2021
jmeter log level = OFF
jmeter defautl args -n -Dlog_level.jmeter=OFF -Jprometheus.ip=0.0.0.0
jmeter user args -t ramp_test_plan.jmx -JTARGET_HOST=konakart.dev.akamas.io -JTHREADS=40
Creating summariser <summary>
Created the tree successfully using ramp_test_plan.jmx
Starting standalone test @ Fri Apr 02 06:35:37 GMT 2021 (1617345337225)
Waiting for possible Shutdown/StopTestNow/HeapDump/ThreadDump message on port 4445
summary +    153 in 00:00:23 =    6.8/s Avg:    44 Min:     9 Max:  1300 Err:     0 (0.00%) Active: 5 Started: 5 Finished: 0
summary +    612 in 00:00:30 =   20.4/s Avg:    25 Min:     5 Max:   324 Err:     0 (0.00%) Active: 11 Started: 11 Finished: 0
summary =    765 in 00:00:53 =   14.5/s Avg:    29 Min:     5 Max:  1300 Err:     0 (0.00%)
summary +   1071 in 00:00:30 =   35.8/s Avg:    26 Min:     4 Max:   335 Err:     0 (0.00%) Active: 17 Started: 17 Finished: 0
summary =   1836 in 00:01:23 =   22.2/s Avg:    27 Min:     4 Max:  1300 Err:     0 (0.00%)
summary +   1408 in 00:00:30 =   46.9/s Avg:    60 Min:     4 Max:  1087 Err:     0 (0.00%) Active: 23 Started: 23 Finished: 0
summary =   3244 in 00:01:53 =   28.8/s Avg:    41 Min:     4 Max:  1300 Err:     0 (0.00%)
summary +   1831 in 00:00:30 =   61.0/s Avg:    60 Min:     4 Max:  1634 Err:     0 (0.00%) Active: 29 Started: 29 Finished: 0
summary =   5075 in 00:02:23 =   35.6/s Avg:    48 Min:     4 Max:  1634 Err:     0 (0.00%)
summary +   1913 in 00:00:30 =   63.7/s Avg:   137 Min:     5 Max:  2024 Err:     0 (0.00%) Active: 35 Started: 35 Finished: 0
summary =   6988 in 00:02:53 =   40.5/s Avg:    72 Min:     4 Max:  2024 Err:     0 (0.00%)
summary +   1785 in 00:00:28 =   63.3/s Avg:   225 Min:     8 Max:  2833 Err:     0 (0.00%) Active: 0 Started: 40 Finished: 40
summary =   8773 in 00:03:21 =   43.7/s Avg:   103 Min:     4 Max:  2833 Err:     0 (0.00%)
Tidying up ...    @ Fri Apr 02 06:38:58 GMT 2021 (1617345538215)
... end of run
END Running Jmeter on Fri Apr  2 06:38:58 UTC 2021

In case you see any errors (check out the Err: column), chances are that JMeter cannot contact Konakart. Please verify that your instance address is correct and relaunch the manual test until you are sure JMeter is running correctly.

Test plans

The JMeter docker image includes a couple of test plans described here below:

Ramp test plan

This test allows you to stress test Konakart with a ramp load profile. This profile is included in the ramp_test_plan.jmx file.

You can customize the profile by setting the following JMeter variables (see the example above):

  • THREADS, the maximum number of virtual users (default 20)

  • RAMP_SEC, the load test duration in seconds (default 200)

Plateau test plan

This test allows you to do a performance test of Konakart with an initial ramp-up and then with a constant load. This profile is included in the plateau_test_plan.jmx file.

You can customize the scenario by setting the following JMeter variables (see the example above):

  • THREADS, the maximum number of virtual users (default 20)

  • RAMP_UP_MIN, the ramp-up duration in minutes (default 1)

  • RAMP_UP_COUNT, the number of steps in the ramp (default 5)

  • HOLD_MIN, the plateau duration in minutes (default 5)

Setup Prometheus (optional)

Unless you plan to use a different monitoring tool (such as Dynatrace), Prometheus is a great choice to start using Akamas.

Now that Konakart and JMeter are up and running, the last step is to setup Prometheus. In this scenario, Prometheus allows you to gather any metrics you will need for your Akamas optimizations, for example, the performance test metrics measured by JMeter (e.g. transaction throughput and response time) or related to application resource usage.

This environment also includes a number of useful dashboards that you can use to monitor the application, infrastructure and load testing key metrics.

By running the following command you can launch Prometheus and Grafana, plus a set of preconfigured dashboards to monitor your load tests:

docker stack deploy -c konakart-docker/monitoring/docker-compose.yml monitoring

Explore Grafana dashboards (optional)

The following is a quick overview of the preconfigured dashboards that you can use to monitor the application, infrastructure and load-testing key metrics. These dashboards are available as part of the Prometheus installation.

You can view this dashboard by accessing Grafana on port 3000 of your Konakart instance.

JMeter Exporter

The JMeter dashboard allows you to monitor your performance tests.

For example, run again the JMeter performance test described before and see the results in the JMeter dashboard:

Docker Container

The Docker dashboard allows you to see the resource consumption of your containers, including the Konakart application:

JMX Exporter

The Node dashboard allows you to see the OS-level Linux performance metrics of your instance:

At this point, you have a simple test environment for your Akamas optimizations.

Konakart