-
Notifications
You must be signed in to change notification settings - Fork 10
Generating Benchmark Configurations
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.
PBench's default configuration is in the params.json file in the PBench repository.
pbench genconfig default
displays the contents of params.json
.
Display the help for pbench genconfig
.
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
.
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.
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 must exist before running pbench genconfig
, and a config.json
file must exist inside the output directory.
-
Create the output directory.
-
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:
- 2xlarge - config.json, README
- large-ssd - config.json, README
- large - config.json, README
- medium-spill - config.json, README
- medium-ssd - config.json, README
- medium - config.json, README
- small - config.json, README
- xlarge-ssd - config.json, README
- xlarge - config.json, README
- xsmall - config.json, README
To use the default parameters and the the default template, and save the resulting configuration to a directory named clusters
:
-
Create the
clusters
output directory. -
Copy the
config.json
file from a cluster size directory in the PBench repository to theclusters
output directory. -
Run the following command:
./pbench genconfig -p params.json -t templates clusters