Display VCPU affinity with PowerVP
cggibbo 270000TMUJ Visits (12973)
This post introduces two new features that I came across recently and found rather interesting. The first relates to PowerVP (VCPU affinity) and the second to POWER8 (Flexible SMT).
I’m particularly impressed by this new feature in PowerVP version 1.1.2 (SP1). You can view CPU and memory affinity information directly from the PowerVP GUI.
From the PowerVP Installation and User Guide:
“If you go to the View menu and select the Display CPU affinity information, the CPU utilization information will be replaced in the Core columns by the partition affinity information for the cores. If you hover your mouse over a core, you will see a tool tip showing the virtual CPU affinity by partition and will see the LPAR ID and the number of virtual CPUs assigned to the partition on that core. This information can be helpful when analyzing the processor affinity of your system. Note that for shared partitions, a partition could have affinity for multiple cores. Also, just because a partition has affinity for a core, that partition will not necessarily be dispatched to that core when it runs. Partition dispatching is performed by the hypervisor, if you want more information on this, refer to documentation on the hypervisor in the IBM Infocenter.”
Once I selected the “Display CPU affinity information” option, I noticed that the cores, shown in the “node drill down” view, showed partition affinity using different colours for each LPAR. Hovering my mouse over a core showed each of the LPAR ids and their associated virtual CPU count assigned to the core.
I was able to do the same with memory. The boxes next to the memory controllers (MC0 or 1) are memory affinity boxes. The colours in these boxes show the percentage of memory that is assigned to a partition on that particular memory controller. Hovering the mouse over this box showed the LPAR id and the percentage of memory assigned to each LPAR. This information may be useful if you are reviewing a particular partitions memory affinity.
To make it easier to read, I was able to obtain a list of LPARs and their associated colours from the Edit menu with the “Select Visible LPARs” option.
I have noticed that if you have partitions configured with dedicated processors, if you click on the LPAR name (in the partition list), PowerVP will highlight the cores with the colour assigned to the dedicated partition. However, if your partitions are configured with shared processors, they are all highlighted with the same colour (blue). At this time, PowerVP will not differentiate between different shared processor pools. Perhaps this feature will appear in the future?
You can learn more about PowerVP from the following Redbook on the topic:
Something else I wanted to mention, that is related to CPU affinity, is Flexible SMT. This new feature is available on POWER8 systems. It is covered in more detail in section 4.2 of the new POWER8 tuning Redbook. What is interesting is that compared to previous generations of POWER processor, the performance characteristics of a thread are the same, regardless of which h/w thread is active. This will allow for more equal execution of work on any thread of the processor. It also means that techniques such as rsets and bindprocessor may no longer be required on POWER8.
From the Redbook:
On POWER7 and POWER7+, there is a correlation between the hardware thread number (0-3) and the hardware resources within the processor. Matching the thread numbers to the number of active threads was required for optimum performance. For example, if only one thread was active, it was thread0; if two threads were active, they were thread0 and thread1.
On POWER8, the same performance is obtained regardless of which thread is active. The processor balances resources according to the number of active threads. There is no need to match the thread numbers with the number of active tasks. Thus, when using the bindprocessor command or API, it is not necessary to bind the job to thread0 for optimal performance.
With the POWER8 processor cores, the SMT hardware threads are designed to be more equal in the execution implementation, which allows the system to support flexible SMT scheduling and management.
On POWER8, any process or thread can run in any SMT mode. The processor balances the processor core resources according to the number of active hardware threads. There is no need to match the application thread numbers with the number of active hardware threads.
Hardware threads on the POWER8 processor have equal weight, unlike the hardware threads under POWER7. Therefore, as an example, a single process running on thread 7 would run just as fast as running on thread 0, presuming nothing else is on the other hardware threads for that processor core. AIX will dynamically adjust between SMT and ST mode based on the workload utilization.