Set Pool Sizes
- Updated2023-02-17
- 3 minute(s) read
Set Pool Sizes
Sets the number of CPUs in the CPU pools for automatic load balancing.
This node creates the System and Timed Structures pools as adjacent pools of contiguous CPUs. The System pool begins at CPU 0 and the Timed Structures pool begins where the System pool ends.
Inputs/Outputs

system pool
Number of CPUs to assign to the System pool.
This node returns an error if you specify 0 in this input or if the values you specify for system pool and timed structures pool add up to more than the number of CPUs available in the real-time operating system (RTOS).
If you set both system pool and timed structures pool to -1, this node assigns all CPUs in the RTOS to both pools. If you set either system pool or timed structures pool to -1, this node assigns all remaining CPUs to that pool.
Default value: -1

timed structures pool
Number of CPUs to assign to the Timed Structures pool.
This node returns an error if you specify 0 in this input or if the values you specify for system pool and timed structures pool add up to more than the number of CPUs available in the real-time operating system (RTOS).
If you set both system pool and timed structures pool to -1, this node assigns all CPUs in the RTOS to both pools. If you set either system pool or timed structures pool to -1, this node assigns all remaining CPUs to that pool.
Default value: -1

error in
Error conditions that occur before this node runs.
The node responds to this input according to standard error behavior.
Default value: No error

assigned CPU pools
Pool assignment of each CPU.
| System and Timed Structures | The CPU is assigned to both the System pool and the Timed Structures pool for automatic load balancing of all threads that are not manually assigned to a particular CPU. |
| System | The CPU is assigned to the System pool for automatic load balancing of non-Timed-Loop threads. |
| Timed Structures | The CPU is assigned to the Timed Structures pool for automatic load balancing of Timed Loop threads. |
| Reserved | The CPU is not assigned to a pool. The CPU is reserved for Timed Loops configured for manual processor assignment. |

error out
Error information.
The node produces this output according to standard error behavior.
Examples
On an eight-CPU system, if you specify a value of 3 for both system pool and timed structures pool, this node assigns CPU 0 through CPU 2 to the System pool, CPU 3 through CPU 5 to the Timed Structures Pool, and leaves CPU 6 through CPU 7 reserved for use by Timed Loops configured for manual CPU assignment.Maximizing CPU Utilization
To maximize processor utilization, you can adjust the number of CPUs to assign to each pool based on the estimation of the proportion of total processing time dedicated to Timed Loops versus system threads. You can estimate the processing load distribution using the RT Get CPU Loads node.