Configurable CPU Cores
Longhorn 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.
The CPU mask is a hexadecimal (hex) representation of a binary bitmask, where each bit corresponds to a specific CPU core.
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 | 0001 | 0x1 |
| 2 Cores | 0011 | 0x3 |
| 3 Cores | 0111 | 0x7 |
| 4 Cores | 1111 | 0xF |
Example for 23 Cores: To allocate 23 cores, you need 23 bits set to 1.
111 1111 1111 1111 1111 11110x7FFFFFNote: Do not confuse the number of cores with the hex value. For instance, setting
0x4(Binary0100) only enables one core (Core #2), whereas0xF(Binary1111) enables four cores.
To set CPU cores globally across the cluster, update the data-engine-cpu-mask setting.
0xF).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 will use the global setting specified by data-engine-cpu-mask. When a per-node configuration is set, the v2 data engine will prioritize this value over the global setting for that specific node.
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.
© 2019-2026 Longhorn Authors | Documentation Distributed under CC-BY-4.0
© 2026 The Linux Foundation. All rights reserved. The Linux Foundation has registered trademarks and uses trademarks. For a list of trademarks of The Linux Foundation, please see our Trademark Usage page.