Simultaneous Multi-Threading (SMT) allows sharing of processor facilities to run two or more threads of execution at the same time on a single processing core. On POWER7, each processing core supports up to 4 threads of execution. SMT generally increases the performance capacity of a system and can improve the responsiveness of multithreaded applications. Running multiple instruction streams at the same time does not, however, improve the performance of any given task. POWER8 and POWER9 support up to 8 threads per processor core.
The Processor Multitasking system value (QPRCMLTTSK) is used to control how SMT is used on the partition. The system value has 3 options:
• Off (0) – Each processor supports the processing of only one task at any moment.
• On (1) – Processors can concurrently process multiple tasks.
• System controlled (2) – Processors can concurrently process multiple tasks. The system-controlled state also enables the operating system to occasionally limit a processor to processing one task at most.
In the past, changes to this system value required an IPL to take effect. But now with enhanced SMT controls in IBM i 7.1 with TR5, you can switch between SMT modes immediately without an IPL. We have also introduced a new set of APIs to allow for additional controls to limit the number of hardware threads per processor. The Change Processor Multitasking Information (QWCCHGPR) API can be used to change the maximum number of secondary hardware threads per processor and the Retrieve Processor Multitasking Information (QWCRTVPR) API can be used to view the current setting on the partition.
In the 7.4 release, the Retrieve Processor Multitasking Information (QWCRTVPR) API was enhanced for improved SMT reporting and now returns the current and maximum number of secondary hardware threads, in addition to the configured number of secondary hardware threads, per processor.
In most cases, the system value should be set to 2 (system controlled) and there should be no need to change it. But if a situation arises in which IBM support determines your workload could benefit from limiting the number of processing threads, the system value along with the additional API controls can be used to make an immediate change.
For more information, see the following links in the IBM i Information Center and IBM developerWorks:
Processor Multitasking (QPRCMLTTSK) system value
“Enhanced Administrative SMT controls for POWER7” section in the IBM i Functional Enhancements article.
I’d like to thank Angela Newton for writing this blog article. Angela is the team leader of the IBM i work management team and is the IBM i expert for the development of APIs within the operating system. Thanks, Angela!
This blog post was edited to fix broken links on March 29, 2020. It was also modified to include a few notes about SMT on POWER8/9 and 7.4 enhancements.
This blog post was originally published on IBMSystemsMag.com and is reproduced here by permission of IBM Systems Media.