[AIAB-03] Create the optimization study

In this guide, your goal is to optimize Konakart performance such that:

  • throughput is maximized so that your e-commerce service can successfully support the high traffic peaks expected in the upcoming highly demanding season

  • as you need to take into account the customer experience, you want also to make sure that the response time always remains within the required service-level objective (SLO) of 100ms.

This business-level goal translates into the following configuration for your Akamas study:

  • goal: maximize transactions_throughput metric

  • constraint: transactions_response_time metric to stay under 100ms

You can simply take the following description of your study and copy it in a study-max-throughput-with-SLO.yaml file:

name: Optimize konakart throughput with response time SLO
description: Tune the JVM to increase transaction throughput while keeping good performance
system: konakart

goal:
  objective: maximize
  function:
    formula: konakart.transactions_throughput
  constraints:
    absolute:
    - name: ResponseTimeSLO
      formula: konakart.transactions_response_time <= 100    # 100ms service-level objective (SLO)

windowing:
  type: stability
  stability:
    metric: konakart.transactions_response_time
    width: 2
    maxStdDev: 1000000
    when:
      metric: konakart.transactions_throughput
      is: max

workflow: konakart-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_parallelGCThreads
  domain: [1,4]
- name: jvm.jvm_concurrentGCThreads

parameterConstraints:
- name: "JVM max heap must always be greater than new size"
  formula: jvm.jvm_maxHeapSize > jvm.jvm_newSize
- name: "JVM GC concurrent threads must always be less than or equal to parallel"
  formula: jvm.jvm_parallelGCThreads >= jvm.jvm_concurrentGCThreads

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

- name: optimize
  type: optimize
  numberOfExperiments: 50

and then run the following command to create your study:

akamas create study study-max-throughput-with-SLO.yaml

Last updated