Configurable CPU Cores
SUSE Storage now supports configurable CPU cores for the V2 Data Engine through the use of a CPU Mask. This mask allows you to define exactly which CPU cores are allocated to the engine, offering both global and per-node configuration options.
Understanding the CPU Mask
The CPU mask is a hexadecimal (hex) representation of a binary bitmask, where each bit corresponds to a specific CPU core.
-
A bit set to 1 means the core is enabled for the data engine.
-
A bit set to 0 means the core is skipped.
|
NVMe BDF Block Devices and I/O Queues: When using Because of this, the physical NVMe device’s I/O queue count must be strictly greater than the number of SPDK CPU cores configured via the CPU mask. If the CPU mask allocates as many or more cores than the available I/O queues on the physical device (for example, allocating 2 cores to an EBS NVMe volume that only provides 2 I/O queues), SPDK will exhaust the queues. This leads to incomplete I/O processing and causes volume I/O to hang indefinitely. |
How to Calculate the Mask
To determine the correct hex string, visualize your CPU cores as a sequence of bits from right to left:
| Desired No. of Cores | Binary Representation (Cores 3, 2, 1, 0) | Hexadecimal Value |
|---|---|---|
1 Core |
|
0x1 |
2 Cores |
|
0x3 |
3 Cores |
|
0x7 |
4 Cores |
|
0xF |
Example for 23 Cores: To allocate 23 cores, you need 23 bits set to 1.
-
Binary:
111 1111 1111 1111 1111 1111 -
Hexadecimal:
0x7FFFFF
|
Do not confuse the number of cores with the hex value. For instance, setting |
Global Configuration
To set CPU cores globally across the cluster, update the data-engine-cpu-mask setting.
-
Navigate to Settings > General.
-
Locate Data Engine CPU Mask.
-
Enter your calculated hex string (for example,
0xF).
Per-node Configuration
For node-specific CPU core allocation, update the spec.dataEngineSpec.v2.cpuMask field of the instance manager with a hexadecimal encoded string. By default, this value is empty, and the V2 Data Engine uses the global setting specified by data-engine-cpu-mask. When a per-node configuration is set, the V2 Data Engine prioritizes this value over the global setting for that specific node.
Calculation Tools
You can use a Binary to Hex Converter to help calculate your mask. Type a 1 for every core you wish to allocate and convert the resulting binary string to Hex.