Topic
IC4NOTICE: developerWorks Community will be offline May 29-30, 2015 while we upgrade to the latest version of IBM Connections. For more information, read our upgrade FAQ.
5 replies Latest Post - ‏2013-10-24T10:00:20Z by Wouter Liefting
SystemAdmin
SystemAdmin
6902 Posts
ACCEPTED ANSWER

Pinned topic CPU info correlation between commands: lparstat -i & lsdev,bindprocessor -q

‏2012-11-06T18:36:18Z |
Hi,

I have problem with counting physical cores and LPAR cores on AIX 6.1 server. I found all cmds, which I need to determine those facts, but I can't get into conclusion.

First of all, I've tried to get how many physical CPU chips and cores is on host:

lsdev -C -c processor -S a - Output:

proc0 Available 00-00 Processor


prtconf - part of the output:

System Model: IBM,9117-MMB Machine Serial Number: XXXXXXXX Processor Type: PowerPC_POWER7 Processor Implementation Mode: POWER 7 Processor Version: PV_7_Compat Number Of Processors: 1 Processor Clock Speed: 3108 MHz CPU Type: 64-bit Kernel Type: 64-bit LPAR Info: 61 XXXXXXX Memory Size: 16384 MB Good Memory Size: 16384 MB Platform Firmware level: AM730_066 Firmware Version: IBM,AM730_066 Console Login: enable Auto Restart: 

true Full Core: 

true


*bindprocessor -q *- Output:

The available processors are:  0 1 2 3


lscfg -vp|grep WAY - Output:

8-WAY  PROC CUOD: 8-WAY  PROC CUOD: 8-WAY  PROC CUOD: 8-WAY  PROC CUOD: 8-WAY  PROC CUOD: 8-WAY  PROC CUOD: 8-WAY  PROC CUOD: 8-WAY  PROC CUOD:


lparstat -i - Output:

Node Name                                  : XXXXXXXXX Partition Name                             : XXXXXXXXX Partition Number                           : 61 Type                                       : Shared-SMT-4 Mode                                       : Uncapped Entitled Capacity                          : 0.30 Partition Group-ID                         : 32829 Shared Pool ID                             : 5 Online Virtual CPUs                        : 1 Maximum Virtual CPUs                       : 1 Minimum Virtual CPUs                       : 1 Online Memory                              : 16384 MB Maximum Memory                             : 16384 MB Minimum Memory                             : 16384 MB Variable Capacity Weight                   : 128 Minimum Capacity                           : 0.20 Maximum Capacity                           : 1.00 Capacity Increment                         : 0.01 Maximum Physical CPUs in system            : 64 Active Physical CPUs in system             : 64 Active CPUs in Pool                        : 2 Shared Physical CPUs in system             : 64 Maximum Capacity of Pool                   : 200 Entitled Capacity of Pool                  : 130 Unallocated Capacity                       : 0.00 Physical CPU Percentage                    : 30.00% Unallocated Weight                         : 0 Memory Mode                                : Dedicated Total I/O Memory Entitlement               : - Variable Memory Capacity Weight            : - Memory Pool ID                             : - Physical Memory in the Pool                : - Hypervisor Page Size                       : - Unallocated Variable Memory Capacity Weight: - Unallocated I/O Memory entitlement         : - Memory Group ID of LPAR                    : - Desired Virtual CPUs                       : 1 Desired Memory                             : 16384 MB Desired Variable Capacity Weight           : 128 Desired Capacity                           : 0.30 Target Memory Expansion Factor             : - Target Memory Expansion Size               : - Power Saving Mode                          : Disabled


I assume that server has one physical CPU with one (on POWER7 it is impossible I think...) physical core. Output from "bindprocessor" makes me confused... It shows 4 proc, based on Shared-SMT-4? On the other hand output from "lscfg" shows 8 CPU, each has 8 cores (8*8 gives 64 - sth like that got in "lparstat - Active Physical CPUs in system" I assume that those are virtual cores from shared resources (managed by HMC), am I right? I'm looking for some correlation to understand all of that. I know that directive:Shared-SMT-4, in simple words, divides one cpu to four cpus, but still don't know how many LPAR cores is active on that moment on that server and how many phyisical cores is on that CPU...
Updated on 2012-11-06T21:12:41Z at 2012-11-06T21:12:41Z by unixgrl
  • unixgrl
    unixgrl
    185 Posts
    ACCEPTED ANSWER

    Re: CPU info correlation between commands: lparstat -i & lsdev,bindprocessor -q

    ‏2012-11-06T21:12:41Z  in response to SystemAdmin
    The lparstat gives the friendliest output.

    Entitled Capacity : 0.30 You get .3 physical CPU entitlement
    Shared Pool ID : 5 You are in a shared CPU pool
    Online Virtual CPUs : 1 You get 1 virtual CPU
    Maximum Virtual CPUs : 1
    Minimum Virtual CPUs : 1
    Maximum Physical CPUs in system : 64 There are 64 physical CPUs in frame
    Active Physical CPUs in system : 64
    Active CPUs in Pool : 2 There are only 2 CPU in your pool
    Shared Physical CPUs in system : 64
    Cores to a CPU - there isn't really a way to see this. You have to look up the cores/processor value based on machine type on the IBM website. In IBM world most of use the term core/cpu interchangably.

    The bindprocessor is showing you the threads, since you are SMT-4 you see 4 processors on your 1 virtual CPU.
    • This reply was deleted by Kumar- 2013-10-23T15:23:26Z. Reason for deletion: .
    • Kumar-
      Kumar-
      8 Posts
      ACCEPTED ANSWER

      Re: CPU info correlation between commands: lparstat -i & lsdev,bindprocessor -q

      ‏2013-10-23T15:24:20Z  in response to unixgrl

      Hi There,

       

      Thanks for helping to understand the statistics.

      Please help on, How to calculate the per virtual processor speed or say computing power in GHz, in case suppose I have 10 virtual CPUs partition running on 4 Processing units [physical cores] each of 3.1Ghz.

      Will all those 10 virtual cpus get 3.1Ghz computing power individually, or the total computing power of 4 cpus [3.1*4] will be divided amongs 10 virtual cpus?

       

      • Wouter Liefting
        Wouter Liefting
        100 Posts
        ACCEPTED ANSWER

        Re: CPU info correlation between commands: lparstat -i & lsdev,bindprocessor -q

        ‏2013-10-23T15:56:16Z  in response to Kumar-

        The short answer is: the latter. The available CPU capacity (3.1*4) will be divided across all partitions and virtual processors. This is largely based on the "entitled capacity" of the partitions, but if you have "uncapped" partitions the unallocated capacity will also be shared. How much each partition gets then depends on the "weight" of the partition.

        The long answer is that there is a lot more to it. When I'm teaching the PowerVM course, CPU time allocation (and the optimization thereof) is easily a day worth of course materials.

        Computing the virtual processor speed is largely irrelevant. If you have one 3.1 GHz processor that needs to run two tasks, it's not like each task gets 1.55 GHz. Rather, the available CPU capacity is split time-wise across the tasks. So for each 10 ms timeslice each task gets exclusive access to the CPU for 5 ms - all things being equal. You can't even say that this is roughly the equivalent of a 1.55 GHz processor, since the apparent speed of the computer depends on a lot more than just raw GHzs alone. Cache misses, memory access, I/O waits and such all have influence as well, and do not change linearly with CPU speed. And SMT-4 makes things even more complex.

        • Kumar-
          Kumar-
          8 Posts
          ACCEPTED ANSWER

          Re: CPU info correlation between commands: lparstat -i & lsdev,bindprocessor -q

          ‏2013-10-24T09:27:32Z  in response to Wouter Liefting

          Thanks for making me understanding it more clearly.

          Now, I have another query regarding the same scenario, -- What should be the best practise in case, I have a to create a lpar having 10CPUs as per the initial demand. This lpar will run a large database for a highly transactional application. I want to use virtual processors instead of assigning 10 physical cores [Power7].  Will 4 processing units entitlement do the relevant job or I should increase the entitlement.

          I mean, how to determine the physical entitlement and virtual processors allocation in a particular lpar. When can someone comment that the CPU allocation is perfect.

          • Wouter Liefting
            Wouter Liefting
            100 Posts
            ACCEPTED ANSWER

            Re: CPU info correlation between commands: lparstat -i & lsdev,bindprocessor -q

            ‏2013-10-24T10:00:20Z  in response to Kumar-

            Kumar, that is impossible to answer based on a short post.

            First, you don't have a choice between virtual processors and physical cores. The hypervisor will always map whatever amount of "virtual processors" you specified, onto the number of available "physical processors". If you use "dedicated processors" there is a 1-on-1 relationship, if you use processors from the "shared pool" ("shared processors"), anything can happen depending on the exact settings, the size of the shared pool, and how much CPU demand there is from other partitions. There may be a 1-on-1 relationship but it may also be that up to 10 (20 on the latest Power7 HW) virtual processors will be folded onto one physical processor. Which is highly inefficient.

            Furthermore, what also matters is whether your workload is peaking a lot, or whether it's relatively constant throughout the day. And do you have the spare capacity in the managed system to deal with those peaks or not? Do you have other partitions on the same machine that can benefit from the available CPU cycles if your partition is quiet? Oh, and what is the licence entitlement for your database? How many CPU cores are you paying for?

            You said you have to create the LPAR with 10 CPUs (cores I assume) as per the initial demand. Is that what your customer is paying for, and what your licence entitlement is? If you then only entitle the partition to four processing units, you only allow the partition to use 40 ms of CPU time for each timeslice of 10 ms. While the customer specified 100 ms of CPU time per timeslice. Doesn't sound like that's going to work.

            In any case, an entitlement of 4.0 but 10 virtual processors only makes sense if your partition is "uncapped". And only if your workload is "bursty", with the troughs of your workload needing about 4.0 CPU, but the peaks requiring 10.0 CPU. And if there are at least 10 physical CPUs available in the shared pool (or MSPP if you use that), and the other partitions in the same shared pool are also bursty with peaks at different times. If your workload is fairly constant, or if there is no excess capacity in the shared pool in the first place, your system will run better with just 4 or maybe 5 VPs. Assuming that the entitled capacity of 4.0 is sufficient for the task of course.

            You see, there are a lot of variables that influence the proper settings for best performance. And we haven't even discussed what "best" performance is in a virtualized environment. (Highest throughput for this single partition, or optimum use of resources across all partitions?) Fully answering your question on this forum is not going to work because you really need an expert who is going to dig into your exact situation and requirements. You can either get help from such an expert, or become an expert yourself. Attend a course (I recommend the AN31), attend a conference (The Power conference in Athens is coming up early November) or dig into a few redbooks and other IBM documentation.