Quick Guides
  • Free Trial options
  • Quick Guides: Akamas in a sandbox
    • [AIAS-01] Guide: Explore an Optimization Study for a Kubernetes microservices application
      • [AIAS-01] Architecture overview
      • [AIAS-01] Explore the Study
      • [AIAS-01] Explore the System
      • [AIAS-01] Explore the Workflow
      • [AIAS-01] Explore the analysis
      • [AIAS-01] Explore the results
    • [AIAS-02] Guide: Create a study to optimize Java performance using the Akamas UI
      • [AIAS-02] Architecture overview
      • [AIAS-02] Create the Study
      • [AIAS-02] Define the optimization goal
      • [AIAS-02] Define the optimization parameters
      • [AIAS-02] Define the performance metrics
      • [AIAS-02] Define the optimization steps
      • [AIAS-02] Explore the results
    • [AIAS-03] Guide: Create a study to optimize K8s microservices costs using the Akamas CLI
      • [AIAS-03] Architecture overview
      • [AIAS-03] Create the system
      • [AIAS-03] Create the Workflow
      • [AIAS-03] Create the Study
      • [AIAS-03] Explore the results
  • Quick Guides: Akamas in a box
    • [AIAB-00] Install Akamas-in-a-box
      • [AIAB-00] Setup your Linux box
      • [AIAB-00] Install Akamas
    • [AIAB-01] Optimize a Java-based application (Renaissance benchmark)
      • [AIAB-01] Architecture overview
      • [AIAB-01] Create the System and its associated components
      • [AIAB-01] Configure the Telemetry
      • [AIAB-01] Create the workflow
      • [AIAB-01] Create and run the study
      • [AIAB-01] Explore the results
    • [AIAB-02] Optimize a Java-based application (Konakart) with JMeter
      • [AIAB-02] Architecture overview
      • [AIAB-02] Create the system and its components
      • [AIAB-02] Automate performance tests
      • [AIAB-02] Create the Telemetry Provider
      • [AIAB-02] Create the workflow
      • [AIAB-02] Create the study
      • [AIAB-02] Explore the results
    • [AIAB-03] Optimize a Java-based application (Konakart) with LRE
      • [AIAB-03] Architecture overview
      • [AIAB-03] Setup LoadRunner Enterprise
      • [AIAB-03] Create the system and its components
      • [AIAB-03] Create the telemetry instances
      • [AIAB-03] Create the workflow
      • [AIAB-03] Create the optimization study
    • [AIAB-04] Optimize a Java-based Kubernetes application (Online Boutique)
      • [AIAB-04] Architecture overview and setup
      • [AIAB-04] Setup Online Boutique
      • [AIAB-04] Setup Akamas
      • [AIAB-04] Create the system and its components
      • [AIAB-04] Create the workflow
      • [AIAB-04] Create the Study
      • [AIAB-04] Explore the results
Powered by GitBook
On this page
  • Create the Study
  • Run the Study

Was this helpful?

Export as PDF
  1. Quick Guides: Akamas in a box
  2. [AIAB-01] Optimize a Java-based application (Renaissance benchmark)

[AIAB-01] Create and run the study

It's now time to set up and run our first optimization! In Akamas, an optimization is called a Study.

Create the Study

In this scenario, you will be creating a Study with the following properties:

  • The goal of the optimization will be to minimize the duration of our Renaissance benchmark - indeed for data analytics applications it's critical to reduce the time required to analyze the data and provide insights

  • The parameters to be optimized include just a handful of common JVM options like the heap size and the garbage collector type

  • The metrics that we will measure for each experiment will be the application response time and the resource consumption (CPU and memory usage)

  • The duration of the study will be 30 experiments, which typically takes about 1 hour

In the other guides you will learn how to define a study from the UI or to specify the YAML file to get it created from the CLI. Since the purpose of this guide is to focus on getting your started, for this time you will simply use the study-max-performance.yaml file provided in the repository, defined as the following:

name: Optimize Java application performance
system: renaissance

goal:
  objective: minimize
  function:
    formula: renaissance.response_time

workflow: renaissance-optimize

parametersSelection:
- name: jvm.jvm_gcType
- name: jvm.jvm_maxHeapSize
  domain: [32, 1024]
- name: jvm.jvm_newSize
  domain: [16, 1024]
- name: jvm.jvm_survivorRatio
- name: jvm.jvm_maxTenuringThreshold
- name: jvm.jvm_maxHeapFreeRatio
  domain: [41, 100]

metricsSelection:
- renaissance.response_time
- renaissance.cpu_used
- renaissance.mem_used

kpis:
  - name: "Response time"
    formula: renaissance.response_time
    direction: minimize
  - name: "CPU used"
    formula: renaissance.cpu_used
    direction: minimize
  - name: "Memory used"
    formula: renaissance.mem_used
    direction: minimize

parameterConstraints:
- name: "Max heap must always be greater than new size"
  formula: jvm.jvm_maxHeapSize > jvm.jvm_newSize

steps:
- name: baseline
  type: baseline
  values:
    jvm.jvm_maxHeapSize: 1024

- name: optimize
  type: optimize
  numberOfExperiments: 30

Create the study:

akamas create study study-max-performance.yaml

You can also check from the UI that you have this Study in the corresponding UI section.

Congratulations, your first Akamas study is ready to be started!

Run the Study

Duration: 01:00

You can now start your first study with the command:

akamas start study 'Optimize Java application performance'

or by accessing the Study menu in the UI, clicking on the study, and then pressing the Start button:

Notice that all steps so far can be done even without a valid installation. However, in order to start a study, you need to have a valid license installed. See Install the license

Congratulations, your first Akamas study is now running!

You can follow the progress of the study from the UI by selecting the Progress tab:

The Progress tab also allows following the workflow tasks execution, including logs for troubleshooting:

You can also execute the following command from time to time:

akamas list experiments 'Optimize Java application performance'

This optimization study is expected to automatically run all its experiments for about 1 hour. Of course, this may vary depending on your specific system and study configuration.

Notice that you can always stop (and restart) a study before all experiments are completed. This can be done by using the Stop button in the UI.

or by executing the following command:

akamas finish study 'Optimize Java application performance'

Notice: while Akamas is running experiments, it may happen that a bad configuration results in an error such as Java OutOfMemoryError or similar. When that happens, the experiment is marked as failed. But don't worry! Akamas AI learns from those failures and it automatically takes them into account in order to quickly explore the most promising areas of the optimization space.

You can now analyze the partial results of the optimization study as its experiments progress.

Previous[AIAB-01] Create the workflowNext[AIAB-01] Explore the results

Last updated 2 years ago

Was this helpful?