Achieving Processor and Memory Affinity using Dynamic Platform Optimizer on POWER Hardware

by | Jun 3, 2015

As IT professionals, we’re always looking for ways to get the best performance out of our systems. On the systems side, much of the focus on optimizing performance is placed at the operating system layer (CPU attributes, memory tuning, I/O related tuning, etc). With the introduction of features such as Dynamic Logical Partitioning, Live Partition […]

As IT professionals, we’re always looking for ways to get the best performance out of our systems.

On the systems side, much of the focus on optimizing performance is placed at the operating system layer (CPU attributes, memory tuning, I/O related tuning, etc). With the introduction of features such as Dynamic Logical Partitioning, Live Partition Mobility, and Partition Suspend/Resume, the capabilities of the Hypervisor are exploited more and more as the POWER family of hardware matures, but it’s not always without cost. As partition resources are dynamically reallocated within managed systems, or LPARs are moved between physical frames, their processor and memory affinity can become increasingly inefficient with each change.

IBM introduced the Dynamic Platform Optimizer (DPO) feature in order to allow customers to improve processor/memory affinity on POWER hardware, all while client partitions are up and running. DPO was initially introduced on the Power 7+ hardware running firmware level 760, and continues to be offered on Power 8 hardware, yet I’ve rarely seen customers exploit it! For some reason, the feature has flown under the radar, but if you have a large PowerVM environment, and are exploiting DLPAR and LPM often, it is something you should consider.

You can find a great representation of system resource allocation before and after a DPO operation from the IBM PowerVM Virtualization Managing and Monitoring Redbook.

It’s very easy to see if your POWER server has suffered from suboptimal processor/memory affinity. By running the lsmemopt command from your HMC (V7.6.0 or later) against a managed system, you’ll be able to see the current state of your systems processor to memory placement (curr_sys_score) and the predicted placement after DPO is run (predicted_sys_score).

Below is an example from a current customer who is just now starting to migrate to two Power 8 S822s with two 10-core 3.42 GHz POWER8 processor cards and 512GB of memory:

hscroot@hmc:~> lsmemopt -m managedsysname -o calcscore -r sys
curr_sys_score=81,predicted_sys_score=98,requested_lpar_ids=none,protected_lpar_ids=none

At this point, the customer has only created 20 partition profiles/shells on each Power 8 S822, migrated two AIX instances to each respective frame, and has performed one LPM operation between each frame. You can see just how quickly processor/memory affinity can become degraded! Running the DPO optimize operation can either be run from the HMC command line (optmem) or it can be scheduled to run at a user defined date and time through the HMC GUI (Operations→ Schedule Operations → Options → New → Monitor/Perform Dynamic Platform Optimize).

hscroot@hmc:~> optmem -m managedsysname -t affinity -o start

Monitor progress (value progress will increase):

hscroot@hmc:~> lsmemopt -m managedsysname
in_progress=1,status=Inprogress,type=affinity,opt_id=8,progress=14,requested_lpar_ids=none,protected_lpar_ids=none,impacted_lpar_ids=none
...
hscroot@hmc:~:> lsmemopt -m managedsysname
in_progress=0,status=Finished,type=affinity,opt_id=8,progress=100,requested_lpar_ids=none,protected_lpar_ids=none,"impacted_lpar_names=lpar1,lpar2,lpar3,lpar4,lpar5,lpar6,lpar7,lpar8,lpar9","impacted_lpar_ids=5,7,10,13-16"

End result:

hscroot@hmc:~> lsmemopt -m managedsysname -o calcscore -r sys
curr_sys_score=98,predicted_sys_score=98,requested_lpar_ids=none,protected_lpar_ids=none

At the very least, run the lsmemopt command against a managed system in your environment. DLPAR and LPM have been around for quite some time now so you may find an opportunity for a quick boost in performance!

Related Articles

Tech Talk:  Galileo Cloud Compass

Tech Talk: Galileo Cloud Compass

Simple Cloud Costing? Galileo Cloud Compass to the Rescue! A video chat with the developers who bring right-sized cloud costing information in real-time. It all started with a casual conversation...

read more