Topic
  • 2 replies
  • Latest Post - ‏2013-09-12T12:18:50Z by armink
armink
armink
30 Posts

Pinned topic perfstat_partition_total on dedicated donating lpar (wrong sample code)

‏2013-09-11T11:31:27Z |

Hi there,

 

I'm implementing an entitlement and pool usage monitoring for LPARs in shared and dedicated donating mode.

As a base I'm using the sample code from http://publib.boulder.ibm.com/infocenter/pseries/v5r3/index.jsp?topic=/com.ibm.aix.prftools/doc/prftools/prftools07.htm and have some problems with it.

First there are at least 2 typos in the sample code:

              dlt_idle_donated_purr= lparstats.idle_donated_purr - last_idle_donated_purr;
              dlt_busy_donated_purr= lparstats.busy_donated_purr - last_busy_donated_purr;
         ->   dlt_idle_stolen_purr = lparstats.idle_donated_purr - last_idle_donated_purr;  <-
              dlt_busy_stolen_purr = lparstats.busy_stolen_purr - last_busy_stolen_purr;

should read like

              dlt_idle_donated_purr= lparstats.idle_donated_purr - last_idle_donated_purr;
              dlt_busy_donated_purr= lparstats.busy_donated_purr - last_busy_donated_purr;
         ->   dlt_idle_stolen_purr = lparstats.idle_stolen_purr - last_idle_stolen_purr;   <-
              dlt_busy_stolen_purr = lparstats.busy_stolen_purr - last_busy_stolen_purr;

This is later added to the already existing delta_purr:

              delta_purr+= dlt_idle_donated_purr + dlt_busy_donated_purr+ dlt_idle_stolen_purr 
                        + dlt_busy_stolen_purr;

again later there is the physical CPU consumption calulated from delta_purr:

              phys_proc_consumed = (double)delta_purr / (double)delta_time_base;

Using this code displays always a value near or equal the amount of CPUs in the dedicated donating LPAR, regardless of the LPAR load or any entitlement donations or steals.

This is, from my point of view, wrong, since donated and stolen entitlement is added to actual CPU consumption and then displayed as consumption.

When I omit the purr addition, I get the same physc as displayed in nmon and topas, so I plan to throw out this piece of code.

 

Is my interpretation right? Or do I get something wrong? What?

And finally to IBM: Please fix the sample code in the performance tools documentation. It's wrong in all versions (5.3, 6.1, 7.1)

 

Thanks,

Armin

Updated on 2013-09-11T14:20:54Z at 2013-09-11T14:20:54Z by armink
  • puvichakravarthy
    puvichakravarthy
    55 Posts

    Re: perfstat_partition_total on dedicated donating lpar (wrong sample code)

    ‏2013-09-12T07:14:15Z  

      I usually check the sample codes which are shipped with AIX. It is available in /usr/samples/libperfstat/simplelparstat.c. In the latest release I see that it has been changed. Kindly confirm the same. Also, looks like the documentation has to be updated.

  • armink
    armink
    30 Posts

    Re: perfstat_partition_total on dedicated donating lpar (wrong sample code)

    ‏2013-09-12T12:18:50Z  

      I usually check the sample codes which are shipped with AIX. It is available in /usr/samples/libperfstat/simplelparstat.c. In the latest release I see that it has been changed. Kindly confirm the same. Also, looks like the documentation has to be updated.

    Thanks for the information. I didn't think about looking into the samples directory.

    In fact, there is no such addition in the sample code of latest AIX 7.1 TL2. I'll check the sample code for other differences... hopefully it is correct this time :-)

    But what updated documentation do you mean? Everything available to me on IBMs website is wrong, HTML or PDF contains the wrong code...

     

    Armin