The POWER processor architecture uses SMT to provide multiple streams of hardware execution. POWER7 provides four SMT hardware threads per core and can be configured to run in SMT4, SMT2, or single-threaded mode (SMT1 mode or, as referred to in this publication, ST mode) while POWER6 and POWER5 provide two SMT threads per core and can be run in SMT2 mode or ST mode.
By using multiple SMT threads, a workload can take advantage of more of the hardware features provided in the POWER processor than if a single SMT thread is used per core. By configuring the processor core to run in multi-threaded mode, the operating system can maximize the usage of the hardware capabilities that are provided in the system and the overall workload throughput by correctly balancing software threads across all of the cores and SMT hardware threads in the partition.
The Power Architecture provides an SMT Thread Priority mechanism by which the priority among the SMT threads in the processor core can be adjusted so that an SMT thread can receive more or less favorable performance (in terms of dispatch cycles) than the other threads in the same core. This mechanism can be used in various situations, such as to boost the performance of other threads while the thread with a lowered priority is waiting on a lock, or when waiting on other cooperative threads to reach a synchronization point.
SMT thread priority can be used to improve the performance of a workload by lowering the SMT thread priority that is being used on an SMT thread that is running a particular process-thread when:
- The thread is waiting on a lock
- The thread is waiting on an event, such as the completion of an IO event
Alternatively, process-threads that are performance sensitive can maximize their performance by ensuring that the SMT thread priority level is set to an elevated level
There are three ways, through hardware and kernel calls, to set the SMT priority when it is running on POWER processors:
- Modify the SMT priority directly using the PPR register.
- Modify the SMT priority through the usage of special no-ops.
- Using the AIX thread_set_smt_priority system call.
On POWER7 and earlier, code that is running in problem-state can only set the SMT priority level to Low, Medium-Low, or Medium. On POWER7+, code that is running in problem-state can additionally set the SMT priority to Very-Low.
For more information, see: http://www.redbooks.ibm.com/abstracts/sg248079.html?Open