Unix & Linux Forums

Unix & Linux Forums (http://www.unix.com/index.php)
-   AIX (http://www.unix.com/aix/)
-   -   Logical CPUs - LPAR (http://www.unix.com/aix/200493-logical-cpus-lpar.html)

svajhala 09-17-2012 11:12 AM

Logical CPUs - LPAR
Hi Gurus,

My manager has asked me to find out how many CPUs we own against how many CPUs are actually being used. The question might be simple but I am confused with the outputs from some of the commands I ran. In this regard, I have the following questions.

1. Are LPARs and Logical CPUs the same?

2. When I look at my software license, it indicates that we are licensed for 10 Logical CPUs. What is the command that best describes the usage of Logical CPUs.

For example, when I run the following commands to find out the LPAR
HTML Code:

$ uname -L

$ lparstat -i
Node Name                                  : axrsglax
Partition Name                            : AXRSGLAX
Partition Number                          : 4
Type                                      : Dedicated-SMT
Mode                                      : Capped
Entitled Capacity                          : 4.00
Partition Group-ID                        : 32772
Shared Pool ID                            : -
Online Virtual CPUs                        : 4
Maximum Virtual CPUs                      : 8
Minimum Virtual CPUs                      : 1
Online Memory                              : 14080 MB
Maximum Memory                            : 32768 MB
Minimum Memory                            : 2048 MB
Variable Capacity Weight                  : -
Minimum Capacity                          : 1.00
Maximum Capacity                          : 8.00
Capacity Increment                        : 1.00
Maximum Physical CPUs in system            : 16
Active Physical CPUs in system            : 8
Active CPUs in Pool                        : -
Shared Physical CPUs in system            : -
Maximum Capacity of Pool                  : -
Entitled Capacity of Pool                  : -
Unallocated Capacity                      : -
Physical CPU Percentage                    : 100.00%
Unallocated Weight                        : -
Desired Virtual CPUs                      : 4
Desired Memory                            : 14080 MB
Desired Variable Capacity Weight          : -
Desired Capacity                          : 4.00

Does the above command indicates we have 4 LPARs on our machine?

Can I say that our software has been licensed for 10 LPARs but we are actually using 4 LPARS?


gts1999 09-18-2012 05:49 AM

CPUs are allocated either wholly or at sub-cpu from HMC.
Sub-cpu processors will be considered vcpu (virtual) once inside an LPAR.

Any number of vcpu can be assigned to a host, giving a certain rPerf (horsepower) figure.
Once assigned to a host they will show up as /dev/procN.

These are (for most applications) the licensable CPU components.

You will need to consider if your application supports multithreading and figure out what CPU configuration will work best (ie one super-fast or many smaller CPUs) and crucially, in the most cost-effective manner with regards to license costs.

Also consider the output below, where the lcpu figure is 4, although 2 cpus are allocated. SMT being enabled means there are 2 threads per core so sar reports these as "lcpu". Something to be mindful of.


# sar -P ALL | grep lcpu
System configuration: lcpu=4  mode=Capped

# lsdev -C | grep proc
proc0          Available 00-00        Processor
proc2          Available 00-02        Processor

# lsattr -El proc0
frequency  1654344000    Processor Speed      False
smt_enabled true          Processor SMT enabled False
smt_threads 2              Processor SMT threads False
state      enable        Processor state      False
type        PowerPC_POWER5 Processor type        False


Also note the link below is a good intro to CPU in a virtual environment.

CPU monitoring and tuning

bakunin 09-18-2012 02:47 PM


Originally Posted by svajhala (Post 302701777)
1. Are LPARs and Logical CPUs the same?

Not even by a far stretch. CPUs - logical or physical - are processors. An LPAR is a virtual system. It is entitled to use some resources - processors, memory, (virtual) network cards, etc., to run an operating system of its own and one or more applications on top of it.

The difference to a physical machine (like your PC, laptop or something such) is, that it is virtual. Physically there is a host system, which is managed by a HMC (Hardware Management Console). This HMC keeps all the LPAR definitions (called "profiles") and is able to start and stop these. In these definitions there are values for the various resources an LPAR gets assigned once it starts. The host system can be real big and host many LPARs.

The host system has a lot of processors, memory, and so on. Once the LPAR starts it gets some amount of memory, some processors and other resources. The profile says how much/how many and in some cases which ones.

For some resources there are three values: minimum, desired and maximum. Minimum is what it says - if there isn't as much of the resource to allocate the LPAR won't start. (You can have more LPAR profiles than real hardware and not all LPARs have to be up permanently.) If there is enough of a resource available the LPAR will get assigned the "Desired" amount. However, if the load of an LPAR is heavy and the resource is available it will get assigned automatically more, up to "Maximum". This will be taken away automatically too once the load gets lighter.

I hope this helps.

svajhala 09-18-2012 03:24 PM

Thanks for the information.


---------- Post updated at 02:24 PM ---------- Previous update was at 02:16 PM ----------

Hi gts1999,

Thanks for the information. I figured out that we have purchased the license for 20 lcpus. But we are using 8 lcpus at the most at any given point of timee. So in this case, can I ask the software vendor to provide a new license for 8 or 10 lcpus as we are currently wasting 12 lcpus?


gts1999 09-18-2012 05:27 PM


Originally Posted by svajhala (Post 302702587)
I figured out that we have purchased the license for 20 lcpus.

As I said above, I doubt the vendor is charging per lcpu.
Likely you mean vcpu (or at least they mean vcpu) :)

If you have only allocated 8 vcpu (of unknown horsepower) to the host, then that is what you should license. If that is what the vendors licensing policy states.

If you dynamically allocate or the vendor has some other rules about licensing ie what is potentially allocatable, then you should clarify what their licensing terms are with regard to this.

This is especially important in some configurations eg an active-passive cluster or an idle workload partition. Some vendors have different rules on what you have to pay for.

bakunin 09-18-2012 07:54 PM

It depends on the application which license model is used. Oracle, for instance, charges per physical CPU in the host system, regardless of how many the LPAR uses and how it distributes the physical CPUs to VCPUs.

It is like "1 POWER7-CPU costs X $ per year" and you multiply that X with the number of CPUs your system has. You can use CPU pools - basically this means you restrict the CPUs a (group of) given LPARs can use to certain ones. You can then base the licensing on the number of CPUs in such a pool instead of licensing the whole machine. Other processors cost differently (for instance, a certain model of Intel CPU will cost a different X, whereas an UltraSPARC will again cost a different X, etc.) but the schema stays the same.

I hope this helps.


svajhala 09-18-2012 11:14 PM

log file shows the following message in our application.

2012-09-14 12:16:23 : INFO : (0 | http-6001-Processor3196) : (PCSF | License Usage) : nodexxxx: LIC_10031 : License [License_xxxxx] logical CPU count [20] authorized on platform [AIX:64]; actual [8] logical CPUs in use. The services currently running on the license are: nodexxxx are x1,x2,x3,x4,x5.

Please clarify.


All times are GMT -4. The time now is 09:00 AM.

Linux and Unix Supported by: vBulletin
Search Engine Optimisation provided by DragonByte SEO v1.1.4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Unix & Linux Forums Content Copyright ©1993-2015. All Rights Reserved.
Forum Operations by The UNIX and Linux Forums