Skip to content

Overview

The below describes the required steps to get started with using Concertio Optimizer Studio software.
While Optimizer Studio can run under any modern Linux distribution, the directions below have been tested on Ubuntu 16.04, Ubuntu 14.04, CentOS 6 and CentOS 7.

Usage

For a brief description of available command line switches, issue:

Concertio Optimizer Studio, version 1.12 (build time: Aug  3 2018, 12:51:10)
AI-Powered performance optimization tools
License information: EVALUATION (not intended for on-going commercial use) valid until: October 02, 2018

Online documentation is available at https://www.concertio.com/docs/ 

Usage: optimizer-studio [OPTION] [OPTION] ... <workload> [workload args]
       optimizer-studio [OPTION] [OPTION] ...

Command line options:
  --sampling-mode=MODE    Select sampling mode. MODE may be either [sync], async:
                          sync   - sampling is synchronized with workload execution
                          async  - periodic sampling with constant intervals
  --settings=PATH         Path to settings YAML file. By default one of:
                          settings-0sync.yaml / settings.yaml
                          will be used, depending on sampling mode
  --knobs=PATH            Path to knob definition YAML file. When no knob file(s)
                          have been provided, the embedded file is used.
                          Each file specified on a command line may override 
                          settings defined in a previous knob file
  --knobs=embedded        Load embedded knob file, even though other knob file(s) 
                          has been specified
  --retain                Retain optimization data from previous Optimizer-studio run
  --warmup-minutes=N      Number of minutes to run the workload prior to starting optimization.
                          By default N = 0.
  --max-minutes=N         Maximum optimization time. If not specified, the optimization process
                          ends according to internal logic.
  --testknob=KNOB-NAME    Run testing procedure for a knob identified by KNOB-NAME and exit
  --testknob=all          Run testing procedure for all knobs and exit
  --settings-script=PATH  The name of autogenerated script that applies the optimal settings
                          discovered throughout the run.
                          By default script name is "/tmp/studio-settings.sh".
  --help                  Display this help message

Running

In order to optimize a workload, provide the workload_script as a parameter, as follows:

$ sudo optimizer-studio ./my_workload
Concertio Optimizer Studio version 1.3
Optimizing ./my_workload
Optimization target: duration
Starting runtime (no time limit) ...
...
Optimization time: 00:06:23
Progress: 100%
Best known knob settings so far:
vm.swappiness: 60
sys.vm.overcommit_ratio: 40
Settings written to: optimizer_studio_settings.sh

In this example, the script my_workload is optimized by Optimizer Studio. Since no configuration file is specified, Optimizer Studio defaults to optimizing CPU and OS knobs. Optimizing these knobs requires root access, so this is why Optimizer Studio is run using sudo.

There are two main ways to use Optimizer Studio to optimize a workload:

  • Synchronous Sampling (Optimizing Full Workloads) - This is the default optimization mode. Optimizer Studio will run the workload until completion several times and will attempt to minimize its runtime or maximize its reported metric using different system settings. This method is appropriate for complex workloads.
  • Asynchronous Sampling (Optimizing Specific Metrics) - By specifying --sampling-mode=async, Optimizer Studio will identify phases of execution of a workload and explore the best settings for each phase. This method is appropriate for simpler or synthetic workloads, where early feedback of application performance can be used to run many more experiments.

The specifics of the optimization method can be controlled using the configuration files.

Workload Settings

Optimizer Studio is responsible for running the workload provided by workload_script. There are several command line parameters that control the way Optimizer Studio runs the workload:

--warmup_minutes. This parameter specifies the number of minutes to fast-forward at the beginning of the run.
--max_minutes. The maximum optimization time can be limited by this parameter. If it's not specified or is zero, Optimizer Studio will terminate the optimization process according to its estimations.
--settings_script. After optimization, Optimizer Studio outputs the discovered optimal settings and the baseline settings to this file, which can run as a script.

Running workloads as a non-root user while optimizing OS/CPU knobs

Optimizer Studio requires root access when optimizing OS and CPU knobs. It is possible to run the workload as the current user using su as in the following example:

$ sudo optimizer-studio su - $USER -c "./workload.sh"

Configuring Knobs

Optimizer Studio can optimize user-defined knobs by providing a configuration file. This is explained in the Configuration section.

Retaining Optimization Data

Optimizer Studio stores the optimization data in /root/.concertio/opt.data. By default, upon invocation of Optimizer Studio, this file is removed. In order to retain the data from the previous run, the --retain command line parameter can be used:

$ sudo optimizer-studio --retain ./my_workload

Using the optimization results

Optimizer studio stores the results of the optimization in a script, as configured in settings.yaml. This script can be used to apply the discovered results:

$ sudo ./optimizer_studio_settings.sh tuned
Concertio Optimizer Studio version 1.0, build date 2018-01-24
Loading optimized settings for ./my_workload
Created on: 2018-01-25 23:23:12
Applying tuned settings
...

To revert to baseline, use:

$ sudo ./optimizer_studio_settings.sh baseline
Concertio Optimizer Studio version 1.0, build date 2018-01-24
Loading optimized settings for ./my_workload
Created on: 2018-01-25 23:23:12
Applying baseline settings
...