IBMi.org – Bart's blog

IBM i and PowerVM features and tools

Monitor CPU, POOL utilization from PHYP cycles

It’s important to know a CPU capacity used by a system. In IBM i world, we have a licpgm – 5761PT1 Performance tools. But what if you run other OS’s than IBM i, on the same POWER box. Or you run LPARs in different shared processor pools ? The most efficient might be tracking CPU cycles dispatched by the POWER Hypervisor. In this post I show you, how to interpret performance data collected by a HMC, and how to allow IBM i collects and display dispatched CPU cycles.

With POWER6, IBM introduced a HMC command lslparutil. The command retrieves a utilization data collected by a HMC, if the ‘utilization data’ feature has been enabled. From my understanding a HMC stores number of CPU cycles assigned to LPAR or pool. With simple calculation we can convert these cycles to percentage of CPU utilization.

Most of the AIX admins use the freeware tool – LPAR2RRD. The tool can run on AIX/Linux/UNIX instance, it talks to a HMC, transfer data, and represent in a graphical format. Most of the IBM i shops won’t be happy, because it needs stuff with some AIX/Linux/UNIX skills. If you decide to use an AIX, the OS license is required.

With IBM i you can get same the same numbers following

If a LPAR runs in shared processor mode use following command

lslparutil -m FRAME -r lpar -h 1 –filter lpar_names=lpartest -F time,entitled_cycles,capped_cycles,uncapped_cycles

It should give you a similar result:

01/27/2014 22:55:56,154318675159123,9653539819933,12886488291342
01/27/2014 22:50:52,154287609733067,9652124977276,12885119717818
01/27/2014 22:45:50,154256631584843,9650660151149,12883682779860
01/27/2014 22:40:46,154225542434664,9649225898123,12882291129714
01/27/2014 22:35:44,154194542696090,9647794134179,12880924840453
01/27/2014 22:30:41,154163529200552,9646348412835,12879550053826
01/27/2014 22:25:38,154132517663249,9644915918575,12878152747810
01/27/2014 22:20:35,154101502715361,9643477894237,12876787392047
01/27/2014 22:15:32,154070481406490,9641998707233,12875360633891
01/27/2014 22:10:29,154039440755070,9640261014806,12872998187413
01/27/2014 22:05:26,154008417369399,9638766051509,12871593494780
01/27/2014 22:00:03,153975342460356,9636912474020,12869253259875

Now, using the formula we can calculate CPU utilization for a particular lpar

lpar

lpar utilization = (((9653539819933-9652124977276) + (12886488291342-12885119717818))/(154318675159123-154287609733067))*100

LPAR utilization = 8.95% between 22:50-22:55

If you want to calculate a pool utilization

lslparutil -m FRAME -r pool -h 1 -F time,utilized_pool_cycles,total_pool_cycles

It gives you this

01/27/2014 23:40:49,814596783594687,49423342024877611
01/27/2014 23:35:46,814373583411751,49413553638688304
01/27/2014 23:30:44,814122417250409,49403775802038422
01/27/2014 23:25:41,813881975615058,49393993298715683
01/27/2014 23:20:37,813664475793660,49384192879120019
01/27/2014 23:15:35,813404776294079,49374411480821649
01/27/2014 23:10:32,813169721173845,49364636281341302
01/27/2014 23:05:29,812946489462962,49354853633103795
01/27/2014 23:00:02,812662435505919,49344279433457300
01/27/2014 22:55:56,812468131984382,49336323073608146
01/27/2014 22:50:52,812250625660221,49326520652849207
01/27/2014 22:45:50,811997896263939,49316747647501123

Now, using the formula we can calculate a pool utilization

pool

pool utilization =((814596783594687-814373583411751)/(49423342024877611-49413553638688304))*100

pool utilization = 2,28% between 23:35-23:40.

If you run OS ver 6.1 with certain level of PTF, you can collect the hypervisor data directly by an IBM i LPAR.

To allow collection, it is necessary to enable it, in the partition properties.

HMCpropert

Shortly after, you should see the file QAPMLPARH collecting the hypervisor data.

As an alternative you can display these figures in IBM Navigator for i.

navigator1

navigator2

In the QAPMLPARH file you can find metrics such as

  • HPPRCE – Processor entitled time
  • HPPRCEU – Entitled time used
  • HPPRCEUU – Uncapped time used

Using formula below you can also get capacity delivered by the POWER Hypervisor

Utilization % = 100 *(HPPRCEU+HPPRCUU)/HPPRCE

Advertisements

2 responses to “Monitor CPU, POOL utilization from PHYP cycles

  1. pave704 February 26, 2014 at 21:30

    Little correction 🙂
    LPAR2RRD can be hosted on any Unix/Linux OS, not only on AIX as is stated above.
    It also does not require any special AIX skills.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: