IBM Support

Enabling SMT on PowerKVM guests

Technical Blog Post


Abstract

Enabling SMT on PowerKVM guests

Body

By: Thadeu Cascardo.

POWER8 processor cores support up to 8 processor threads per core, supporting simultaneous multi-threading (SMT).   Processor threads allow more instructions to be dispatched in parallel on a single processor core, by using multiple execution units.   Many workloads can benefit from the throughput gains of Simultaneous Multi-Threading support when the same code and same data is run on those multiple threads of the same core.

The new PowerKVM feature available with IBM Power Systems S812L and S822L exploits SMT, allowing each guest to be enabled as desired for SMT. For POWER8 systems, a guest can be configured as SMT=1, SMT=2, SMT=4, or SMT=8.     In general, we recommend that SMT=8 be defined for the guest, allowing the guest to control the desired SMT levels within the guest (with ppc64_cpu --smt=xx).    Operating systems that exploit POWER8 systems will be able to leverage SMT levels up to SMT=8. 

 

In order to configure a KVM Guest, the number of VCPUs on a guest must be set to the product of cores and threads per core assigned to the guest, and the number of threads per core must be explictly set.   For example, to limit a guest to SMT=4, when using libvirt, one can configure a guest with the following settings in order to get a guest with SMT=4 and 2 cores:

<vcpu>8</vcpu>
<cpu>
<topology sockets='1' cores='2' threads='4'/>
</cpu>  

With that configuration, a guest OS will be able to enable SMT=4 and use the 8 threads across the assigned two cores. A configuration using only 2 VCPUs and no specified topology would use the same physical resources, but would not be able to exploit SMT, being restricted to only 2 threads, one in each core.    

 

For the recommended configuration for a guest running a Linux operating system enabled for POWER8 (for example, Ubuntu 14.04, RHEL 7 beta, and the SLES 12 beta), we would recommend defining the guest to SMT=8, and assigning the desired number of processor cores.    The guest OS can then dynamically limit the SMT modes with the ppc64_cpu command as desired.

<vcpu>8</vcpu>
<cpu>
<topology sockets='1' cores='1' threads='8'/>
</cpu>  

In a future article, we will discuss the new capabilities of a POWER8 core to support micro-threading mode.    

 

[{"Business Unit":{"code":"BU054","label":"Systems w\/TPS"},"Product":{"code":"HW1W1","label":"Power ->PowerLinux"},"Component":"","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"","Edition":"","Line of Business":{"code":"","label":""}}]

UID

ibm16171051