Cgroup options

You can use the /etc/storpool.conf configuration file to define several options related to cgroups. For more information on StorPool and cgroups, see Control groups.

Enabling cgroups

The following option enables the usage of cgroups. The default value is 1:

SP_USE_CGROUPS=1

Each StorPool process requires a specification of the cgroups it should be started into; there is a default configuration for each service. One or more processes may be placed in the same cgroup, or each one may be in a cgroup of its own, as appropriate. StorPool provides a tool for setting up cgroups called storpool_cg. It is able to automatically configure a system depending on the installed services on all supported operating systems.

StorPool RDMA module

The SP_RDMA_CGROUPS option is required for setting the kernel threads started by the storpool_rdma module:

SP_RDMA_CGROUPS=-g cpuset:storpool.slice/rdma -g memory:storpool.slice/common

Options for StorPool services

Use the following options to configure the StorPool services (see Background services):

  • storpool_block

    Use the SP_BLOCK_CGROUPS option:

    SP_BLOCK_CGROUPS=-g cpuset:storpool.slice/block -g memory:storpool.slice/common
    
  • storpool_bridge

    Use the SP_BRIDGE_CGROUPS option:

    SP_BRIDGE_CGROUPS=-g cpuset:storpool.slice/bridge -g memory:storpool.slice/alloc
    
  • storpool_server

    Use the SP_SERVER_CGROUPS option:

    SP_SERVER_CGROUPS=-g cpuset:storpool.slice/server -g memory:storpool.slice/common
    SP_SERVER1_CGROUPS=-g cpuset:storpool.slice/server_1 -g memory:storpool.slice/common
    SP_SERVER2_CGROUPS=-g cpuset:storpool.slice/server_2 -g memory:storpool.slice/common
    SP_SERVER3_CGROUPS=-g cpuset:storpool.slice/server_3 -g memory:storpool.slice/common
    SP_SERVER4_CGROUPS=-g cpuset:storpool.slice/server_4 -g memory:storpool.slice/common
    SP_SERVER5_CGROUPS=-g cpuset:storpool.slice/server_5 -g memory:storpool.slice/common
    SP_SERVER6_CGROUPS=-g cpuset:storpool.slice/server_6 -g memory:storpool.slice/common
    
  • storpool_beacon

    Use the SP_BEACON_CGROUPS option:

    SP_BEACON_CGROUPS=-g cpuset:storpool.slice/beacon -g memory:storpool.slice/common
    
  • storpool_mgmt

    Use the SP_MGMT_CGROUPS option:

    SP_MGMT_CGROUPS=-g cpuset:storpool.slice/mgmt -g memory:storpool.slice/alloc
    
  • storpool_controller

    Use the SP_CONTROLLER_CGROUPS option:

    SP_CONTROLLER_CGROUPS=-g cpuset:system.slice -g memory:system.slice
    
  • storpool_cgmove

    Use SP_CGMOVE_SLICE to set where the service should move processes that it finds in the root cgroup. Default: /system.slice

    SP_CGMOVE_SLICE=/system.slice
    

    Use SP_CGMOVE_CGROUPS to set which cgroups storpool_cgmove should handle. Default: cpuset memory

    SP_CGMOVE_CGROUPS=cpuset memory
    
  • storpool_nvmed

    Use the SP_NVMED_CGROUPS option:

    SP_NVMED_CGROUPS=-g cpuset:storpool.slice/beacon -g memory:storpool.slice/common
    

More information

For details about cgroups configuration for other StorPool services, see iSCSI options.