AIX

AIX

Connect with fellow AIX users and experts to gain knowledge, share insights, and solve problems.

 View Only

Power Management and Frequency Monitoring on AIX

By Brian F. Veale posted Thu December 02, 2021 11:31 AM

  

IBM® PowerTM servers include EnergyScaleTM technology that allows administrators to understand and control the power and cooling usage within the system. Support for EnergyScale extends up through the AIX operating system.

This article shows you how to monitor processor frequency and query the system from the AIX command line to determine processor power and performance mode information such as the minimum, static, and maximum processor frequencies and more.

Contributors:  @Brian F. Veale, @Caleb Olson

Processor Frequency Monitoring

The recommended method for monitoring processor frequency from AIX is to use the lparstat -E 1 or mpstat -E 1 command. The commands calculate the current running processor frequency averaged over a time interval. The two commands are introduced below followed by important notes on how to properly use the commands and how they determine the processor frequency.

lparstat -E 1 presents LPAR level statistics. Below is the syntax and an example showing how to use the command.

Syntax: lparstat -E interval [count]

Example:

# lparstat -E 1 1

System configuration: type=Dedicated mode=Capped smt=8 lcpu=8 mem=4096MB Power=Maximum Performance

Physical Processor Utilisation:

--------Actual-------- ------Normalised------
user sys wait idle freq user sys wait idle
---- ---- ---- ---- --------- ---- ---- ---- ----
0.001 0.002 0.000 0.998 3.5GHz[100%] 0.001 0.002 0.000 0.998

mpstat -E 1 presents per-virtual CPU statistics. Below is the syntax and an example showing how to use the command

Syntax: mpstat -E interval [count]

Example:

# mpstat -E 1 1

System configuration: lcpu=8 mode=Capped

vcpu pbusy physc freq scaled physc
---- ----- ----- ---- ------------
0 0.0004[ 0%] 0.9993[100%] 3.5GHz[100%] 0.9993[100%]


Important Notes on usage of lparstat -E 1 and mpstat -E 1:

  • The interval parameter is required and specifies the interval of time for the statistics to be reported.
  • If the interval parameter is omitted, the statistics and processor frequency reported will be the average value since time of the last boot of the LPAR. It is highly likely that this will not represent the current running processor frequency.
  • The count parameter is optional and specifies the number of reports to generate. When omitted, the commands will generate reports based on the frequency specified in the interval parameter until stopped.

The lparstat -E 1 and mpstat -E 1 commands both calculate the processor frequency by determining how much faster or slower the processor is running at in relation to the static processor frequency reported by system firmware to AIX (also known as “nominal” frequency). This is done by looking at the Processor Utilization Resource Register (PURR) and Scaled PURR (SPURR) counters in the processor. PURR increments at a set timebase frequency that is the same across all Power systems and SPURR increments at a rate that is proportional to the processor frequency. The ratio of the SPURR vs PURR measurements is then used along with the static processor frequency to calculate the actual running processor frequency.

A Note on pmcycles

The pmcycles command in AIX reports the static processor frequency. The pmcycles command also has a -M option that measures processor frequency which is undocumented and is not supported on AIX version 7.2 and earlier since it may return an incorrect processor frequency value.


The pmcycles -M command option is supported on AIX version 7.3 and later and uses a virtualized timebase value that is preserved across hypervisor interruptions.

Reporting EnergyScale Information from AIX

The AIX lparstat command has two main options that report processor power and performance mode information such as the power saving mode (also known as the power and performance mode), minimum, static, and maximum processor frequencies and more.

lparstat -i

The lparstat -i command displays the Power Saving Mode:

# lparstat -i | grep 'Power Saving Mode'
Power Saving Mode                          : Maximum Performance

lparstat -N

New for Power10 systems and later, the lparstat -N command reports EnergyScale information including the Power and Performance Mode, Idle Power Saver Status, minimum, static, and maximum processor frequencies, and the processor folding status for AIX.

This command is useful for customers that want to validate that the processors in their Power10 or later servers are capable of running at a specific processor frequency.

# lparstat -N
Power and Performance Mode                 : Maximum Performance
Idle Power Saver Status                    : Not Supported
Minimum Frequency (Mhz)                    : 3251
Static Frequency (Mhz)                     : 3550
Maximum Frequency (Mhz)                    : 3900
Processor Folding Status                   : Disabled

These are the required AIX levels to use the new lparstat -N command option:

  • AIX Version 7.1 with the 7100-05 Technology Level and Service Pack 7100-05-05-2136, or later
  • AIX Version 7.2 with the 7200-04 Technology Level and Service Pack 7200-04-05-2148, (planned availability February 11, 2022), or later
  • AIX Version 7.2 with the 7200-05 Technology Level and Service Pack 7200-05-03-2136, or later
  • AIX Version 7.3 with the 7300-00 Technology Level and Service Pack 7300-00-01-2148 (planned availability December 10, 2021), or later

Conclusion

AIX supports multiple commands for reporting the running processor frequency of an LPAR or a virtual CPU as well as new enhancements adding support for processor frequency measurement through pmcycles -M on AIX 7.3 as well as processor frequency information and more with the lparstat -N command on Power10 servers, and later.

Additional Resources

AIX Documentation for the lparstat command: https://www.ibm.com/docs/en/aix/7.2?topic=l-lparstat-command
AIX Documentation for the mpstat command: https://www.ibm.com/docs/en/aix/7.2?topic=m-mpstat-command
AIX Documentation for the pmcycles command: https://www.ibm.com/docs/en/aix/7.2?topic=p-pmcycles-command
IBM EnergyScale for Power9 Processor-Based Systems (PDF): https://www.ibm.com/downloads/cas/6GZMODN3
IBM EnergyScale for Power8 Processor-Based Systems (PDF): https://www.ibm.com/downloads/cas/JB3VDKZQ
​​
0 comments
79 views

Permalink