When optimizing Java applications based on OpenJ9, typically the goal is to tune the JVM from both the point of view of cost savings and quality of service.
Please refer to the OpenJ9 optimization pack for the list of component types, parameters, metrics, and constraints.
Akamas offers many operators that you can use to apply the parameters for the tuned JVM. In particular, it is suggested to leverage the to create a configuration file or inject the arguments directly in the command string using a template.
The following is an example of templatized executions string:
A typical workflow to optimize a Java application can be structured in two parts:
Configure the Java arguments
Generate a configuration file or a command string containing the selected JVM parameters using a .
Run the Java application
Here’s an example of a typical workflow where Akamas executes the script containing the command string generated by the file configurator:
Akamas can access JMX metrics using the This provider comes out of the box with a set of default queries to interrogate a Prometheus instance configured to fetch data from a .
Here’s a configuration example for a telemetry provider instance that uses Prometheus to extract all the JMX metrics defined in this optimization pack:
where the configuration of the monitored component provides the additional references as in the following snippet:
See this for an example of a study leveraging the Eclipse OpenJ9 pack.
Use available operators to execute a performance test against the application.
#!/bin/bash
cd "$(dirname "$0")"
java ${jvm.*} -jar myApp.jarname: optimize-java-app
tasks:
- name: Configure Parameters
operator: FileConfigurator
arguments:
source:
hostname: app.akamas.io
username: akamas
path: /home/akamas/app/run.sh.templ
key: rsa-key
target:
hostname: app.akamas.io
username: akamas
path: /home/akamas/app/run.sh
key: rsa-key
- name: Launch Test
operator: Executor
arguments:
command: bash /home/akamas/app/run.sh
host:
hostname: app.akamas.io
username: akamas
key: rsa-keyprovider: Prometheus
config:
address: monitoring.akamas.io
port: 9090name: jvm
description: target JVM
componentType: java-ibm-j9vm-8
properties:
prometheus:
instance: jvm
job: jmx-exporter