Introduction to storpool_cg

Using the storpool_cg utility provided by StorPool you can easily generate the configuration files for cgconfig. It takes care for:

  • Discovering the installed and enabled StorPool services, and the available hardware.

  • Generating the optimal cgroup configuration for the StorPool services.

Using configuration files and options, the administrator can create configurations optimized for different use cases: server-only node, client-only node, hyper-converged, maximum performance, and so on.

Before you start

Before running storpool_cg, make sure that all needed services are installed and network interfaces for StorPool are properly configured in storpool.conf. By default, storpool_cg discovers the installed StorPool services to prepare the correct cgroup configuration. After you change the node configuration - for example, to enable new services or add a new drive - you have to re-run storpool_cg to update the cgroups accordingly.

In some cases you also need to re-run the storpool_hugepages tool. For details, see Hugepages.

Format

The storpool_cg tool should be used as follows:

$ storpool_cg [command] [options] [parameters]

When using the tool on the command line:

  • For [command], you must use one of the conf, print, or check commands.

  • You can set options as needed.

  • You can enter parameter=value pairs on the command line to override (or specify) parameters.

The available options and parameters for each command are listed in the Configuration options and parameters and Verifying machine’s cgroups state and configurations documents.

Viewing results before applying them

When using the conf command, it is always advisable first to run storpool_cg with the -N (--noop) option, as shown in the example below:

$ storpool_cg conf --noop
W: NIC is expected to be on cpu 1
########## START SUMMARY ##########
slice: machine limit: 122920M
slice: storpool limit: 692M
  subslice: storpool/common limit: 692M
  subslice: storpool/alloc limit: 0G
slice: system limit: 2G
slice: user limit: 2G
###################################
cpus for StorPool: [1, 2, 21, 22]
socket:0
  core: 0 cpu: 0,20
  core: 1 cpu: 1,21 <--- 1 - nic; 21 - rdma
  core: 2 cpu: 2,22 <--- 2 - block; 22 - beacon
  core: 3 cpu: 3,23
  core: 4 cpu: 4,24
  core: 8 cpu: 5,25
  core: 9 cpu: 6,26
  core:10 cpu: 7,27
  core:11 cpu: 8,28
  core:12 cpu: 9,29
socket:1
  core: 0 cpu:10,30
  core: 1 cpu:11,31
  core: 2 cpu:12,32
  core: 3 cpu:13,33
  core: 4 cpu:14,34
  core: 8 cpu:15,35
  core: 9 cpu:16,36
  core:10 cpu:17,37
  core:11 cpu:18,38
  core:12 cpu:19,39
###################################

########### END SUMMARY ###########

This way you can see an overview of the configuration the tool can create for the machine. Note that the configuration is not written because the --noop option was used. This gives you the opportunity to decide whether the configuration is appropriate for the machine:

  1. Keep using the --noop option and add other options as needed, until you get a suitable configuration.

  2. Once you decide the configuration is good, apply it by running storpool_cg without the --noop option.

Understanding results

The results provided by storpool_cg conf --noop (see the example above) are displayed in sections as follows:

  • Memory configuration, including StorPool slices and subslices.

  • CPU configuration, including which cores are used by StorPool services.

  • storpool_server instances cache configuration (might not be displayed if not relevant).