Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
The next step is to define your optimization goal.
Leave the MINIMIZE
option, select the renaissance
component, and then choose the response_time
metric for the goal of reducing the benchmark execution time.
It’s now time to select which parameters Akamas needs to tune in this study.
Select the jvm
component and add the following JVM parameters:
jvm_maxHeapSize
jvm_newSize
jvm_maxHeapFreeRatio
jvm_gcType
jvm_survivorRatio
jvm_maxTenuringThreshold
It is also possible to tell Akamas the range of values each parameter can have: this way, AI will suggest configurations that respect desired limits. For example, in the sandbox environment, the max heap size of the JVM has to be limited to 1GB.
Select the following range of values by clicking on the EDIT DOMAIN of the corresponding parameter:
jvm_maxHeapSize: from 32MB to 1024MB
jvm_newSize: from 32MB to 1024MB
jvm_maxHeapFreeRatio: from 41 to 100
Akamas supports constraints among parameters to avoid incorrect combinations of values. In this example, the JVM newSize parameter needs to be lower or equal to maxHeapSize. You can add a new constraint to tell Akamas to keep this relation in consideration during the optimization:
This guide describes how to create an Optimization Study to optimize the performance of a Java application using the UI wizard.
All the artifacts required for this study are already been created and made available in the sandbox environment. Another guide describes how to create an optimization study and all required artifacts from the CLI.
For simplicity's sake, the target application to optimize is Renaissance, a sample Java benchmark that is available in the sandbox environment. The optimization goal is to make Renaissance run faster (minimize the response time of the benchmark iterations). You will leverage Akamas to automatically identify the optimal JVM parameters (like the size of the heap and inner pools, type of garbage collector, etc.) that can speed up the application.
How to create your first study using the Akamas UI
How to conduct an optimization with performance constraints
How to analyze and identify performance insights from a study results
Access to the Akamas-In-A-Sandbox (AIAS) environment with valid credentials.
To create the study, go to the Study menu in the UI and click on the Create button, then select Study:
The study creation wizard will now walk you through the different steps required to create the study.
First of all, choose a name and description for your study, then select the renaissance system and the renaissance-optimize workflow:
Finally, you can define the steps the study will go through.
Typically, an Akamas study is composed of:
a baseline
step, which is used to assess the system performance in the initial configuration (e.g. the settings currently in place for your system)
an optimize
step, which is used to execute the actual AI-driven performance optimization
The Akamas study wizard already creates these two steps for you, so unless you want to add additional steps you just need to configure these two steps.
In this study, we simply configure the baseline configuration by setting jvm_maxHeapSize
to 1024MB:
Then click on the Optimize step in the left panel to specify the optimization configuration.
For now, simply set the number of experiments to execute to 30:
Now click on Create Study.
You have now created your first study and you are ready to start the optimization!
You can review your study in the Definition tab or go and launch the study by pressing the Start button:
Now, you can select the metrics of interest among all the metrics provided by your components.
You can do that by expanding the Choose metrics section and selecting the three metrics of the renaissance
component:
CPU used, representing the total CPU used by the JVM process running the benchmark
Memory used, representing the peak memory used by the JVM process running the benchmark
Response time, representing the response time of the benchmark
You can also click on the jvm
component to deselect its corresponding metrics, as they are not available in this example.
After running the study, you can explore the results of your AI-driven performance optimization study.
Select your study from the UI Study menu.
The Summary tab displays high-level study information at a glance, including the best score obtained so far, and a summary of the tuned parameters and their values for the optimal configuration.
By optimally configuring the JVM parameters, Akamas was able to cut the application response time by 40%:
What are the best JVM settings Akamas found that made the application run so much faster?
Without being told anything about how the application works, Akamas learned the best settings for some interesting JVM parameters:
the max heap size was slightly changed
the best garbage collector is Parallel
The Progress tab allows following the experiments and their workflow tasks execution (including logs for troubleshooting).
The Analysis tab shows the experiments' scores over time, plus a detailed table with key parameters and metrics for each experiment.
Properly tuning a modern JVM is a complex challenge, and might require weeks of time and effort even for performance experts. Akamas AI is designed to converge rapidly toward optimal configurations. In this example, Akamas was able to find the optimal JVM configuration after about 16 automated performance experiments:
The Configuration Analysis tab lets you explore the additional insights and benefits of the configurations Akamas explored with respect to other key metrics besides the goal.
From a CPU efficiency perspective, the best configuration Akamas found was able to cut CPU utilization by 33%, while still improving response time by 17%.
The Metrics tab allows you to check the metrics that the telemetry modules collected over time for each experiment.
Congratulations! You have completed your first Akamas optimization of a Java application, using the Akamas UI optimization wizard!
The following picture represents the high-level architecture of how Akamas operates in this scenario.
The optimization goal is to make Renaissance run faster, a common optimization need for Java applications.
Therefore, the optimization study needs to have the following properties:
The goal of the optimization will be to minimize the response time of the Java application (another goal would be reducing the JVM memory usage)
The parameters to be optimized include some common JVM options like the heap size and the garbage collector type
The metrics that you will measure for each experiment will be the application response time, CPU, and memory usage
The study will execute up to 30 experiments, for a duration of about 1 hour