AIX > Administrator > Performance

CPU Threading Efficiency: New Performance Tuning Perspectives

 CPU threading

Not Productive, But Essential

Because AIX:wait kernel processes only occupy the logical CPU while waiting for a workload thread to execute (i.e., hold and wait), they aren't explicitly productive. That said, this function of orderly waiting serves an essential purpose. It's important to understand that some measure of AIX:wait is critical for thread responsiveness. Don't expect nor aim to eliminate all of it.

But let's consider the other end of this: Can too much CPU be wasted executing AIX:wait kernel processes? In the case of figure 3, yes. This is a profound perspective that is easily verified with AIX:ps guww.

Again, check your own systems and see for yourself. Did you buy software CPU licenses just to execute AIX:wait processes? I wouldn't assume so. But do you see, from the amount of CPU that you've devoted to executing AIX:wait processes, that you could get by with fewer software licenses and likewise fewer virtual CPUs? This is my point. It's grossly inefficient to persistently run with too much total AIX:wait time. Yes, some measure of AIX:wait time is needed for thread responsiveness, but too much CPU can also be configured and wasted for the sake of too much unused thread responsiveness.

Calculating CPU Idle%

The Power Hypervisor dispatches virtual CPUs to CPUcores on 10-millisecond (ms) periods. Of course, there are 100 sets of 10-ms periods in 1 second.

Though the details of this explanation are seemingly arbitrary, they are indeed accurate. Imagine a virtual CPU on a CPUcore is only ever executing one thread in ST/SMT-1 mode throughout all 100 sets of 10-ms periods in a 1-second interval. For such, the 1-second interval would report the virtual CPU is 63 percent busy and 37 percent idle.

Next, imagine a virtual CPU on a CPUcore is only ever executing two threads in SMT-2 mode throughout all 100 sets of 10-ms periods in a 1-second interval. For such, the 1-second interval would report the virtual CPU is 77 percent busy and 23 percent idle.

Again, imagine a virtual CPU on a CPUcore is only ever executing three threads and one AIX:wait process in SMT-4 mode throughout all 100 sets of 10-ms periods in a 1-second interval. For such, the 1-second interval would report the virtual CPU is 88 percent busy and 12 percent idle.

Finally, imagine a virtual CPU on a CPUcore is only ever executing four threads in SMT-4 mode throughout all 100 sets of 10-ms periods in a 1-second interval. For such, the 1-second interval would report the virtual CPU is 100 percent busy and 0 percent idle.

These CPU idle% calculations surprised me, too. The calculation of CPU idle% has nothing to do with the traditional concept of idle CPU cycles; rather, it's calculated from how many concurrently running threads are executing while a virtual CPU is served by a CPUcore.

An Average of Averages

The percentage value of AIX:vmstat -IWw 1:cpu:id is an average of averages. It is the average CPU idle% of all active virtual CPUs and their individual average CPU idle% across 100 sets of 10-ms periods in a 1-second interval. This will likely take some pondering to fully realize.

As explained: Assuming the default value of AIX:schedo:vpm_throughput_mode=0, the AIX:vmstat –IWwt 1:cpu:id percentage represents the average dynamic SMT-mode of all active LPAR virtual CPUs in a 1-second interval.



Like what you just read? To receive technical tips and articles directly in your inbox twice per month, sign up for the EXTRA e-newsletter here.



Advertisement

Advertisement

2017 Solutions Edition

A Comprehensive Online Buyer's Guide to Solutions, Services and Education.

Achieving a Resilient Data Center

Implement these techniques to improve data-center resiliency.

AIX > ADMINISTRATOR > PERFORMANCE

AIO: The Fast Path to Great Performance

AIX Enhancements -- Workload Partitioning

The most exciting POWER6 enhancement, live partition mobility, allows one to migrate a running LPAR to another physical box and is designed to move running partitions from one POWER6 processor-based server to another without any application downtime whatsoever.

IBM Systems Magazine Subscribe Box Read Now Link Subscribe Now Link iPad App Google Play Store
AIX News Sign Up Today! Past News Letters