Number of CPU Threads of the xiraid Module

There are two ways to control the number of CPU threads for xiraid:

  • the cpuignore command

    Specifics:

    • possible to select specific CPUs for the limitation;
    • does not require restarting the module;
    • the limits set by this command are reset after the system or module restart.
  • the modprobe command

    Specifics:

    • not possible to select specific CPUs. For limitation, OS starts to assign CPUs with the first CPU (ID 0);
    • requires restarting the module;
    • possible to configure the module to load with the restriction parameters at OS startup.

To select the CPUs that will not be used for the xiraid module, run

# xicli settings cpu-ignore modify <arg>
Table 1. Argument for the cpu-ignore modify subcommand

Required argument

--id

The list of CPU IDs (separated by a comma or a hyphen) that will not be used for xiraid.

The null value removes the restriction on using threads for xiraid.

Example: Disable CPUs with the IDs 0, 1, 2, 3, 6 for the module:

# xicli settings cpu-ignore modify --id 0-3,6

Example: Remove all restrictions on CPUs for the module:

# xicli settings cpu-ignore modify --id null

To show the list of CPUs that are not used for the xiraid module, run

# xicli settings cpu-ignore show
Table 2. Argument for the cpu-ignore show subcommand

Optional argument

-f

--format

Output format:

  • table;
  • json;
  • prettyjson – human-readable json.

The default: table.

To limit the number of threads for the xiraid module:
  1. Unload the module from the kernel:

    # rmmod xiraid
  2. Load the module in the kernel with the cpu_cnt parameter:

    # modprobe xiraid cpu_cnt=<cnt>

    where <cnt> is the number of CPUs used by the module. The operating system assigns CPUs starting with the very first CPU ID.

  3. Restart xiraid target:
    # systemctl restart xiraid.target

To configure the xiraid module to load automatically with CPU thread parameters, in the modprobe.conf file (file name and location depend on your OS, see man modprobe.conf for details) add the line

options xiraid cpu_cnt=<cnt>

where <cnt> is the number of CPUs used by the module. The operating system assigns CPUs starting with the very first CPU ID.