In this guide, you will add a constraint to an optimization study, by leveraging what has been done in a previous guide. You will create a study that leverages resources defined in the study created in the Create an optimization study using the UI wizard guide. This is also called "bootstrapping" a study.
The target application is Renaissance, a sample Java benchmark that comes built-in with the Akamas-in-a-box installation.
In this scenario, the goal is reducing the memory used as in the previous study, but now you also want to make sure the response time is kept within acceptable values.
The study you want to create has the following properties:
The following picture represents the high-level architecture of how Akamas operates in this scenario.
In the Studies section of the UI expand the options menu of the study you created during the last guide and click on Duplicate.
The UI will then lead you to the new study creation wizard already populated with the properties from the previous study.
The wizard in this instance comes with a pre-generated name and description. You may want to change them to something more suited for our new goal.
You can use the same System and Workflow from the previous study, so you do not need to change these fields.
Since you want to add a constraint, we need to update the optimization goal: leave
MINIMIZE as the optimization direction, then select the
mem_used metric of the
You then need to expand the Add constraints section and add the formula
renaissance.response_time < 20% to the list under Constraints relative to the baseline.
The next step is to select the parameters that Akamas will tune in this study.
For the purpose of this study, you can keep the configuration pre-populated from the original study:
You can also keep the values already configured in the Parameter selection area, requiring the newSize value to be lower than the maxHeapSize as this rules out configurations that are already known not to work.
The next step is to define the optimization steps.
To complete the definition of the study, you can keep the steps pre-configured in the wizard:
baselinestep, which is used to assess the system performance in the initial configuration (e.g.: your current settings)
optimizestep, which is used to execute the actual AI-driven performance optimization
and just click on Create Study.
You now have your new study ready to start! You can review your study in the Definition tab.
If everything looks good, you can now launch the study by pressing the Start button:
Congratulations, your Akamas study is now running!
While the study is running, you can see the progress of the study and start exploring the (partial) results your AI-driven performance optimization study.
You may notice that in this scenario Akamas has flagged some experiments as "failed" despite having completed their execution successfully. This is because those configurations did not manage to keep the response time within the specified constraint, so Akamas is rejecting them as a valid configuration.
You have just learned how to use constraints to make sure that the optimized configuration is aligned with your service-level objectives.
At this point, you can continue to explore other guides, for example:
© Akamas Spa 2018-present. Akamas and the Akamas logo are registered trademarks of Akamas Spa.