Steve's Power Systems BlogPower BlogContactLog inRegister
  • Power Blog
  • Contact

  • Register

IBM Power Systems Blog

Power Systems
  • Front Page
  • Categories
  • Archives
  • Latest comments
  • « How to Disable LPM for an LPAR
  • AIX mpstat and lssrad part 1 »

AIX mpstat and lssrad part 2

Posted by steve on 22 Jun 2017 in Power System Affinity, AIX Tuning, AIX Tips

I have been looking at mpstat outputs for some time now and I have raised a number of PMR calls with IBM as I have found several discrepancies in the outputs.  I have already posted one blog about mpstat incorrectly reporting thread redispatch counters and also discovered that the S5hrd counters can be incremented incorrectly when you have memory only SRADs sharing the same REF id.

I am now sharing my understanding of the mpstat output regarding S0rd, S1rd, S2rd, S3rd, S4rd, S5rd thread migrations and the S3hrd, S4hrd, S5hrd memory affinity counters as I believe many people misunderstand this data and what exactly it is telling you.  Please note this is my interpretation of the data based on PMR questions and answers with AIX kernel developers and Performance Specialists and results seen during testing in my p8 environment.

 

Before I continue, we should first review the lssrad -av output (see post here) as the counters that mpstat reports are based on AIX's view of the LPAR.

Yes, you read that correctly, the output of mpstat is based on AIX's view of the LPAR as returned by lssrad -av.  This means that if you have an LPAR that has been told it is contained within a single Node and Chip, it should never report S4rd or S5rd counts, nor will it report S4hrd or S5hrd counts.  To confirm this I asked the following question to IBM Performance Support.

 

Q1 = So the mpstat statistics for S?rd and S?hrd are based on AIX's view of the hardware reported by lssrad output, regardless of where the VPs are actually dispatched by the Hypervisor.

A1 = Those "redispatch" statistics(S*rd) are maintained relative to the last logical CPU that a thread was dispatched on.  And, the home SRAD redispatch statistics(S3hrd, S4hrd, S5hrd) are maintained based on logical CPU SRAD affinity on AIX.  So, it may be a little tricky in a SPLPAR (Shared Processor Pool) environment because the physical processor mapping of the VP logical CPU SRAD we see from AIX can change dynamically according to shared pool usage.

 

This was an interesting answer and I confirmed the response with the following questions, to which the answer was: "Basically,  the answer to all your questions is yes".

 

Q2 = So if my LPAR has many VPs (more than a single Chip), but reports the lssrad output like this, I will never see S4rd or S5rd as AIX believes the LPAR is contained within a single chip, even though the Hypervisor could schedule VPs to local or remote chips?

# lssrad -av
REF1  SRAD      MEM       CPU
0
         0     7662.69    0-47

 

Q3 - If my LPAR reports an lssrad like this, I may see S4rd and/or S4hrd due to local thread scheduling within AIX and local memory access.
# lssrad -av
REF1  SRAD      MEM       CPU
0
         0    19456.00    0-11 16-19 28-31 40-43 52-55 64-67 76-79
                          88-91 100-103 112-115 124-127
         1    13145.38    12-15 24-27 36-39 48-51 60-63 72-75 84-87
                          96-99 108-111 120-123
         2    14820.00    20-23 32-35 44-47 56-59 68-71 80-83 92-95
                          104-107 116-119


Q4 - If my LPAR reports an lssrad like this, I could see S4rd + S5rd and S4hrd + S5hrd due to local and far thread scheduling and local and
far memory access.
# lssrad -av
REF1  SRAD      MEM       CPU
0
         0    32749.12    0-63
         1     9462.00    64-67 72-75 80-83 88-91
1
         2     2471.19    92-95
2
         3     1992.00
         4      249.00

 

Which LPAR configurations are most affected?

Dedicated LPARs.

LPARs that are running with dedicated cores are always scheduled back to their home cores by the Hypervisor.
Therefore the thread redispatch statistics from mpstat should be a true representation of the redispatches to the physical cores.

 

High Entitlement LPARs.

LPARs with a very high entitlement to Virtual Processor ratio are very likely to be scheduled back to their home cores if they are under entitlement.  Therefore the thread redispatch statistics from mpstat should be very close to a true representation of the redispatches to the physical cores.

 

Low Entitlement LPARs.

LPARs with a low entitlement to Virtual Processor ratio are not guaranteed to be scheduled back to their home cores if they are running over entitlments.  This is especially true if there are other LPARs that are homed to the same cores that are running under entitlement, as these LPARs will get the home cores first.  Therefore the thread redispatch statistics from mpstat may not show a true representation of the redispatches to the physical cores as LPARs running over entitlement could be schedule to any free cores within the frame.

 

 

 

Tags: AIXlssradmpstats0rds1rds2rds3hrds3rds4hrds4rds5hrds5rdthread migration

No feedback yet


Form is loading...

July 2026
Mon Tue Wed Thu Fri Sat Sun
    1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31    
 << <   > >>

IBM Power Systems Blog

IBM Power Systems - Administration, Tuning and Optimisation. These posts are my own personal opinions and comments only.

Search

Categories

  • All
  • AIX Tips
  • AIX Tuning
  • Command Line Tips
  • HMC Tips
  • LPM Information
  • NIM Tips
  • Performance Testing
  • Power System Affinity
  • PowerHA Tips
  • SRIOV and vNIC
  • Scripts and One Liners
  • VIO Server Tips

Recent Posts

  • AIX NIM Hints and Tips
  • Finding Multiple Install Sources for AIX
  • PowerHA and EMC Busy Devices
  • AIX Random Password Generation
  • VIO Server 3.1.0 and ssh host keys
  • VIO Server 3.1.0 Items to Review
  • Just when you thought you understood idle CPU time!!
  • 40Gbit Adapter Performance Testing
  • LPM Copy Time Statistics
  • IBM HMC Upgrades

Recent Comments

  • steve on How to configure IBM SRIOV Adapters
  • Howard Coles on How to configure IBM SRIOV Adapters
  • steve on AIX mpstat and lssrad part 1
  • Charin Kumjudpai on AIX mpstat and lssrad part 1
  • Gagandeep on LPM and multiple vSwitches
  • Fant Steele on VIO Server 3.1.0 and ssh host keys
  • steve on AIX NIM Hints and Tips
  • alan wilcox on AIX NIM Hints and Tips
  • steve on AIX buf_mode attribute for Virtual Ethernet Adapters
  • Bernhar on AIX buf_mode attribute for Virtual Ethernet Adapters
  • Gery on Reading VLANs from the SEA Adapter
  • steve on Reading VLANs from the SEA Adapter
  • patrice on Reading VLANs from the SEA Adapter
  • steve on Reading VLANs from the SEA Adapter
  • steve on AIX buf_mode attribute for Virtual Ethernet Adapters
  • Chris K. on AIX buf_mode attribute for Virtual Ethernet Adapters
  • jovi on AIX or VIOS Errors: 29FA8C20 and 7BFEEA1F
  • steve on AIX or VIOS Errors: 29FA8C20 and 7BFEEA1F
  • jovi on AIX or VIOS Errors: 29FA8C20 and 7BFEEA1F
  • steve on Creating EtherChannel Devices from Command Line

This collection ©2026 by Stephen Diwell • Contact • Help • Web Site Builder

Secure CMS
Cookies are required to enable core site functionality.