Optimizing a sample Linux system

In this study, Akamas is tasked with the optimization of Linux1, a Linux-based system (Ubuntu). The study's goal is to maximize the throughput of the computations of the Sysbench CPU benchmark.

Sysbench is a suite of benchmarks for CPU, file system, memory, threads, etc… typically used for testing the performance of databases.

System1 comes with a Node Exporter that collects system metrics that Akamas consumes through a Prometheus provider. Concerning Sysbench metrics, The study uses the CSV provider to make them available to Akamas.

The study uses Sysbench to execute a performance test against System1.


  1. Setup a Prometheus and a Node Exporter to monitor the System

  2. Install the Prometheus provider

  3. Create a provider instance:

provider: "Prometheus"
  address: "linux1" # address of the Prometheus of system1
  port: 9090 # port of the Prometheus of system1
  component: "linux1-linux"

4. Install the CSV File provider.

5. Create a provider instance:

provider: "CSV"
 address: "linux1"
 authType: "password"
 username: "ubuntu"
 protocol: scp
 remoteFilePattern: "/home/ubuntu/benchmark_log.csv" # the remote path of the CSV with the metrics of the benchmark
 componentColumn: "component" # which column of the CSV should contain the name of the component
 csvFormat: "horizontal"
- metric: "throughput"
  datasourceMetric: "events_per_second"


The study uses a four-task workflow to test System1 with a new configuration:

  1. Task Configure OS, which leverages the LinuxConfigurator operator to apply a new set of Linux configuration parameters

  2. Task Start benchmark, which leverages the Executor operator to launch the benchmark

The following YAML file represents the complete workflow definition:

name: "workflow for linux 1"
- name: "Configure OS"
  operator: "LinuxConfigurator"
    component: linux1-linux

- name: "Start benchmark"
  operator: "Executor"
    command: "bash /home/ubuntu/benchmark.sh"
      hostname: "linux1"
      username: "ubuntu"
      password: "[INSERT_HERE_PASSWORD]"


Within Akamas, System1 is modeled by a system of two components:

  • system1-linux, which represents the actual Linux system with its metrics and parameters and is of type Ubuntu 16.04

  • system1-bench, which represents the Sysbench with its metrics and is of type Sysbench

The following YAML file represents the definition of the Sysbench component type:

name: "Sysbench"
description: "A component-type for Sysbench"
- "throughput" # only one metric


  • Goal: minimize the throughput of the benchmark

  • Windowing: take the default (compute the score for the entire duration of a trial)

  • Parameters selection: select only CPU scheduling parameters

  • Metrics selection: select only the throughput of the benchmark

  • Trials: 3

  • Steps: one baseline and one optimize

The following YAML file represents the definition of the study:

system: "system for linux1"
workflow: "workflow ofr linux1"
name: "linux optimization with sysbench"
description: "Optimizing an Ubuntu instance with a CPU intensive benchmark: sysbench"
  objective: minimize
    formula: "linux1-benchmark.throughput"
  - "linux1-benchmark.throughput"
  - name: "linux1-linux.os_cpuSchedMinGranularity"
  - name: "linux1-linux.os_cpuSchedWakeupGranularity"
  - name: "linux1-linux.os_CPUSchedMigrationCost"
  - name: "linux1-linux.os_CPUSchedChildRunsFirst"
  - name: "linux1-linux.os_CPUSchedLatency"
  - name: "linux1-linux.os_CPUSchedAutogroupEnabled"
  - name: "linux1-linux.os_CPUSchedNrMigrate"
numberOfTrials: 3
  - name: "baseline"
    type: "baseline"
      linux1-linux.os_cpuSchedMinGranularity: 2250000
      linux1-linux.os_cpuSchedWakeupGranularity: 3000000
      linux1-linux.os_CPUSchedMigrationCost: 500000
      linux1-linux.os_CPUSchedChildRunsFirst: 0
      linux1-linux.os_CPUSchedLatency: 18000000
      linux1-linux.os_CPUSchedAutogroupEnabled: 1
      linux1-linux.os_CPUSchedNrMigrate: 32
  - name: "optimization"
    type: "optimize"
    numberOfExperiments: 99
    maxFailedExperiments: 25

Last updated