All pages
Powered by GitBook
1 of 1

Loading...

Optimizing OpenJ9

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.

Workflows

Applying parameters

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

A typical workflow to optimize a Java application can be structured in two parts:

  1. Configure the Java arguments

    1. Generate a configuration file or a command string containing the selected JVM parameters using a .

  2. 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:

Telemetry Providers

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:

Examples

See this for an example of a study leveraging the Eclipse OpenJ9 pack.

Use available operators to execute a performance test against the application.

FileConfigurator Operator
FileConfigurator Operator
Prometheus provider.
JMX Exporter
page
#!/bin/bash
cd "$(dirname "$0")"
java ${jvm.*} -jar myApp.jar
name: 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-key
provider: Prometheus
config:
  address: monitoring.akamas.io
  port: 9090
name: jvm
description: target JVM
componentType: java-ibm-j9vm-8
properties:
  prometheus:
    instance: jvm
    job: jmx-exporter