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

Was this helpful?

Export as PDF
  1. Quick Guides: Akamas in a sandbox
  2. [AIAS-03] Guide: Create a study to optimize K8s microservices costs using the Akamas CLI

[AIAS-03] Create the Study

It's now time to define the optimization study. The overall objective is to increase the cost efficiency of the application, without impacting application reliability in terms of response time or error rates.

To achieve that objective, you create an Akamas study with the goal of maximizing the ratio between application throughput and cloud cost, where:

  • application throughput is the transactions per second as measured by the load-testing tool

  • cloud cost is the total cost to run Kubernetes microservices on the cloud, and is a function of the CPU and memory requests assigned to each container. We assume a sample pricing of $29 per CPU core/month and $3.2 per memory GB/month.

Hence, a good configuration is one that either increases throughput with the same cloud cost, or that keeps throughput constant but with a lower cloud cost.

To avoid impacting application reliability, you can define Akamas metric constraints on transaction response time lower than 500 milliseconds and error rate below 2%.

Here is the relevant section of the study:

goal:
  objective: maximize
  function:
    formula: online_boutique.transactions_throughput / online_boutique.cost
  constraints:
    absolute: 
      - name: response_time
        formula: online_boutique.transactions_response_time <= 500
      - name: error_rate
        formula: online_boutique.transactions_error_rate <= 0.02

As regard the parameters to optimize, in this example Akamas is tuning CPU and memory limits (requests are set equal to the limits) of each deployment in the Online Boutique application, for a total of 22 parameters. Here is the relevant section of the study:

parametersSelection:
  - name: frontend.cpu_limit
    domain: [100, 300]
  - name: frontend.memory_limit
    domain: [64, 512]
  - name: adservice.cpu_limit
    domain: [100, 300]
  - name: adservice.memory_limit
    domain: [64, 512]
    ...

You can review the complete optimization study by looking at the study.yaml file in the akamas/studies folder.

You can now create the optimization study:

akamas create study kubernetes-online-boutique/akamas/studies/study.yaml

and then start the optimization:

akamas start study 'Maximizing Kubernetes Online Boutique cost efficiency while matching SLOs'

You can now explore this study from the Study menu in the Akamas UI and then move to the Analysis tab.

As the optimization study executes the different experiments, this chart will display more points and their associated score.

Previous[AIAS-03] Create the WorkflowNext[AIAS-03] Explore the results

Last updated 10 months ago

Was this helpful?