Skip to content

Generating Benchmark Configurations

Steve Burnett edited this page Jun 19, 2024 · 11 revisions

pbench genconfig Commands and Options

Run ./pbench genconfig --help to see the online help for pbench genconfig.

Generate benchmark cluster configurations

Usage:
  pbench genconfig [flags] [directory to search recursively for config.json]
  pbench genconfig [command]

Available Commands:
  default     Print the built-in default generator parameter file.

Flags:
  -h, --help                    help for genconfig
  -p, --parameter-file string   Specifies the parameter file. Use built-in defaults if not specified.
  -t, --template-dir string     Specifies the template directory. Use built-in template if not specified.

Use "pbench genconfig [command] --help" for more information about a command.

default

PBench's default configuration is in the params.json file in the PBench repository.

pbench genconfig default displays the contents of params.json.

-h, --help

Display the help for pbench genconfig.

-p, --parameter-file string

The path to the parameter file that contains configuration information that applies globally, such as system reserved memory. pbench genconfig searches recursively from the directory that pbench is run in.

A default parameters file is provided in clusters/params.json. To specify the default parameters file, use pbench genconfig -p clusters/params.json.

-t, --template-dir string

The template directory for the benchmark configuration. The default template directory is clusters/templates. For example, pbench genconfig -t clusters/templates.

See the templates README for the formulas that genconfig uses to populate the files in the output directory with values that are taken from the parameter file params.json and the cluster configuration file config.json.

The template follows the grammar for Go language templates. For more information, see the Go template package.

See the clusters/templates README for the formulas.

Using pbench genconfig

Use pbench genconfig to generate benchmark cluster configurations. The configuration generator takes a template folder and replaces the formulas in the template with values calculated using the parameters in a parameters file.

To use pbench genconfig, supply three items:

  • The path to the parameter file
  • The path to the template directory
  • The path to an output directory

The Output Directory

The output directory must exist before running pbench genconfig, and a config.json file must exist inside the output directory.

  1. Create the output directory.

  2. Copy the config.json file from one of the cluster size directories in the PBench repository to the output directory.

The size of the cluster nodes is determined by the config.json file. The cluster size directories are labeled in a t-shirt size format, and have the same directory structure as the templates directory. Select the config.json file from the cluster size directory of the size desired.

Here are links to the config.json file and the README in each of the cluster configuration directories in the PBench repository:

Example

To use the default parameters and the the default template, and save the resulting configuration to a directory named clusters:

  1. Create the clusters output directory.

  2. Copy the config.json file from a cluster size directory in the PBench repository to the clusters output directory.

  3. Run the following command:

    ./pbench genconfig -p params.json -t templates clusters