|Skip Navigation Links|
|Exit Print View|
|Oracle VM Server for SPARC 2.2 Administration Guide Oracle VM Server for SPARC|
You can use dynamic CPU threading controls to optimize workload performance on SPARC T4 systems.
These threading controls enable you to specify the number of hardware threads to be activated per core. Existing applications can take advantage of the dynamic threading performance benefits for SPARC CPUs without having to be rewritten or recompiled.
This section describes how to use the CPU threading controls to optimize CPU performance on SPARC T4 systems. CPU performance can be optimized for maximum throughput by tuning CPU cores to use a maximum number of CPU threads. By default, the CPU is tuned for maximum throughput. Or, CPU performance can be optimized for CPU-bound workloads by tuning CPU cores to maximize the number of instructions per cycle (IPC).
On SPARC T4 systems, you can optimize CPU performance by specifying the CPU threading mode. The threading mode can be set dynamically and independently for each domain on the system. A reboot is not required to change the threading mode, and the set mode is maintained across domain reboots and platform power cycles.
By selecting the appropriate CPU threading mode, you can improve the performance of applications and workloads that are running on a domain. You can select a threading mode that either maximizes throughput or maximizes the number of instructions per cycle, as follows:
Maximizing for throughput (max-throughput). Workloads that benefit most from high throughput run a lot of software and perform a lot of I/O operations. When you optimize for maximum throughput, you enable CPU cores to concurrently run a maximum number of hardware threads. This mode is best for running mixed application workloads and workloads that are highly multi-threaded, such as those performed by web servers, database servers, and file servers. This mode is used by default and is also used on older SPARC T-series platforms, such as SPARC T3 platforms.
Maximizing for IPC (max-ipc). Workloads that benefit most from high IPC are typically CPU bound, single-threaded applications, such as systems that run intensive arithmetic computations. When you optimize for maximum IPC, you enable a CPU thread to execute more instructions per CPU cycle. This optimization is achieved by reducing the number of CPU threads that are concurrently active on the same CPU core.
Select the CPU threading mode for a domain by using the ldm add-domain or ldm set-domain command to set the threading property.
ldm add-domain [threading=max-throughput|max-ipc] ldom ldm set-domain [threading=max-throughput|max-ipc] ldom
The threading property is used to dynamically change the threading mode by specifying one of the following values:
max-throughput. Use this value to select the threading mode that maximizes throughput. This mode activates all threads that are assigned to the domain. This mode is used by default and is also selected if you do not specify any mode (threading=).
max-ipc. Use this value to select the threading mode that maximizes the number of instructions per cycle (IPC). When you use this mode on the SPARC T4 platform, only one thread is active for each CPU core that is assigned to the domain. Selecting this mode requires that the domain is configured with the whole-core constraint.
Use the ldm add-core or ldm set-core command to configure the whole-core constraint. See the ldm(1M) man page.
Note that changing the threading mode dynamically activates or deactivates CPU threads. So, the number of virtual CPUs that are available in the domain also dynamically changes.
The max-ipc threading mode leverages the whole-core constraint, so you must abide by the whole-core constraint requirements and restrictions to do the following:
Change the number of cores that are allocated to a domain.
Enable or disable the whole-core constraint.
Thus, to dynamically change the threading mode of a running domain to max-ipc mode, you must configure the domain with the whole-core constraint.
You can use the following commands to view the threading property value:
The ldm list -o resmgmt command shows the constraints. The following example output shows that the threading property is set to max-ipc:
# ldm list -o resmgmt ldg1 NAME ldg1 CONSTRAINT whole-core max-cores=3 threading=max-ipc
The ldm list -o cpu command shows the deactivated virtual CPUs by specifying a value of 0 in the UTIL column. The bold text in the following max-ipc example shows that only one thread is activated per CPU:
# ldm list -o cpu ldg1 NAME ldg1 VCPU VID PID CID UTIL STRAND 0 8 1 0.3% 100% 1 9 1 0 100% 2 10 1 0 100% 3 11 1 0 100% 4 12 1 0 100% 5 13 1 0 100% 6 14 1 0 100% 7 15 1 0 100% 8 24 2 0.4% 100% ...
The ldm list -l command includes all the information about the specified domain. The bold text in the following example shows that the threading property is set to max-ipc:
# ldm list -l ldg1 ... VID PID CID UTIL STRAND 0 8 1 0.6% 100% 1 9 1 0 100% 2 10 1 0 100% 3 11 1 0 100% 4 12 1 0 100% 5 13 1 0 100% 6 14 1 0 100% ... CONSTRAINT whole-core max-cores=3 threading=max-ipc ...
The threading controls feature has the following restrictions:
The whole-core constraint restrictions apply. See CPU Allocation.
The threading property value does not persist across a domain migration.
The threading property cannot be set to max-ipc while power management (PM) is enabled.
When PM runs, all domains must have the threading property set to max-throughput.