AIX > Administrator > Performance

CPU Threading Efficiency: New Performance Tuning Perspectives

 CPU threading

This is the fourth installment in an ongoing series on improving AIX performance by emphasizing CPU threading efficiency. Read part 1, part 2 and part 3.

Throughout this series of articles, I have used (and will continue to use) the term, "tactical monitoring." By tactical monitoring, I refer to the process of analyzing performance with single-second intervals for performance tuning―this as opposed to studying colorful graphs of multiple-minute intervals for capacity planning. Monitoring a system using multiple-minute intervals can reveal a lot, but monitoring the same system with single-second intervals offers dimensionally deeper performance perspectives.

It's not enough to simply distinguish between these two types of monitoring. It's important to recognize that―as a result of the ever-greater scale, concurrency, virtualization and performance of advancing computing technologies―the differences between monitoring for performance and monitoring for capacity are growing. And given this ever-widening gap, we should distance performance tuning from capacity planning.

There's more to consider than merely ensuring sufficient resources. A 1-second monitoring interval offers performance perspectives that are otherwise lost to the smooth-averaging effect of traditional long-interval capacity monitoring. These performance perspectives illuminate aspects such as spike/burst intensities (of the thread runqueue, device interrupts, system calls, context switches, etc.), dynamic SMT mode pattern shifts, hardware affinity pattern shifts, thread migrations, the balance of involuntary versus voluntary logical context switches (e.g., AIX:mpstat -d:ilcs vs. vlcs), etc.

The AIX:vmstat -IWwt 1 syntax in figure 1 uses a 1-second sampling interval, the shortest possible. Most popular capacity monitoring utilities (nmon, lpar2rrd, etc.) use far longer sampling intervals. Those tools certainly have their place, but with this data, you can begin to understand and appreciate the benefits of the 1-second interval.

The Basis of CPU Idle%

Definition: 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 virtual CPUs in a 1-second interval.

While a virtual CPU is being served by a CPUcore, the CPUcore can dynamically change its SMT mode between ST/SMT-1 through to the LPAR’s maximum SMT mode setting. I call this varying trait the dynamic SMT mode, which underlies the calculation of CPU idle%.

For explicit clarity, when an LPAR’s maximum SMT mode setting is SMT-4 (AIX:smtctl –t 4 for max SMT-4), the dynamic SMT mode of the CPUcore (while serving a given virtual CPU) can, and often does, switch rapidly per thread scheduling demand, between ST/SMT-1, SMT-2 and the max of SMT-4. Thus, we observe four logical CPUs per virtual CPU with AIX:mpstat -s 1 3 (see figure 2).

As well, when an LPAR’s maximum SMT mode setting is SMT-2 (AIX:smtctl –t 2 for max SMT-2), the dynamic SMT mode of the CPUcore (while serving a given virtual CPU) can, and often does, switch rapidly per thread scheduling demand, between ST/SMT-1 and SMT-2 max. Thus, we observe two logical CPUs per virtual CPU with AIX:mpstat -s 1.

Finally, when an LPAR’s maximum SMT-mode setting is SMT-8 (AIX:smtctl –t 8 for max SMT-8), the dynamic SMT mode of the CPUcore (while serving a given virtual CPU) can, and often does, switch rapidly per thread scheduling demand, between ST/SMT-1, SMT-2, SMT-4 and SMT-8 max. Thus, we observe eight logical CPUs per virtual CPU with AIX:mpstat -s 1.



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.


comments powered by Disqus

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