Thursday, November 1, 2018

How to deal with the concept of micro-partition in aix?

How to deal with the concept of micro-partition in Aix?

 It is really hard to get the exact concept/purpose of micro-partition of Aix in google or from IBM site. However, The below is the "what is what" description for the micro-partition concept in Aix. I am sure when you complete to read this, you will get a good understanding about capacity planning in aix. It will help you if you are prepare for your aix interview. 


Power VM:

     PowerVM is the virtualization solution for AIX on IBM Power technology.


Power Hypervisor:

     As the foundation of PowerVM is the Power hypervisor. It is a firmware layer sitting between the hosted operating systems and the server hardware and the power hypervisor delivers the virtualized functions


Micro partition:

     Micro-Partitioning technology allows allocating fractions of processors to a logical partition. A logical partition using fractions of processors is also known as a Micro-Partition. Micro-Partitions run over a set of processors called a Physical Shared-processor pool or simply Shared-Processor Pool.


Processing mode:

      Assign entire processors for dedicated use or assign processor which can be shared with other micro-partitions.


Dedicating processing mode:

      In dedicated mode, physical processors cores are assigned as a whole to partitions. Thus the processing capacity, in this case, is fixed and can’t go beyond that. For example, if you have assigned 2 processors to a partition in a dedicated processing mode, that’s it. It can’t access beyond two processors if required.


Shared dedicated mode:

      The problem with dedicated processing mode is that processing capacity is fixed and during low workload timings, processing capacity get wasted. In power 6, In this Shared Dedicated Mode, unused cycles are harvested and then donated to the physical shared-processor pool associated with Micro-Partitioning. This ensures the opportunity for maximum processor utilization throughout the system.

The Power hypervisor ensures that only spare CPU cycles are donated, hence enabling this feature can help to increase system utilization, without affecting the critical partitions configured in a dedicated processor mode.

 When the CPU utilization of the core goes below a threshold, and all the SMT threads of the CPU are idle from a hypervisor perspective, the CPU will be donated to the shared processor pool. The donated processor is returned instantaneously (within micro-seconds) to the dedicated processor partition when the timer of one of the SMT threads on the donated CPU expires, which means thread got instructions to execute.


·“Allow when the partition is inactive” - if checked, will allow the processors assigned for the dedicated processor partition to be included in the shared processor pool when the partition is powered off (that’s why inactive).


 · “Allow when partition is active” - if checked, will allow the processors assigned for the dedicated processor partition to be included in the shared processor pool when the partition is active, but not making full use of the processors (Shared dedicated processing mode).



Shared Processing Mode:

      In shared processing mode, partitions get fractions of a physical processor. The processing capacity assigned to a partition is known as its entitled capacity and expressed in processing units (PUs). At minimum, a partition can get 0.1 processing units (in other words 10% of a processor’s capacity) and after that any value with an increment of 0.01.

The guaranteed capacity available to a partition within one dispatch cycle, which is 10ms.

Note: The total entitled capacity of all the partitions configured on the system can never exceed the number of processor in that system.



Processing unit:
Desired processing unit / Min / Max processing unit:

      The desired processing units define the processing capacity you desire for this partition to have and Min/Max processing units decide a valid range in which you can change the processing units for this partition.


Virtual processor:
Desired virtual processor / Min / Max Virtual processor:

      Desired virtual processors is the number of virtual processors you want this partition to have and Min/Max defines a valid range for the dynamic movement.


Capped:  Limited to the entitled capacity
•      Example:  1.5 capped processing units means a partition can use up to 15 ms of execution time during each timeslice, but no more than that


Uncapped: If a partition needs extra CPU cycles (more than its entitled capacity), it can utilize unused capacity in the shared pool
      Example:  An uncapped partition with 1.5 processing units is guaranteed to be able to use 1.5 units, but may use more if necessary (and more is available)


Simultaneous Multithreading (SMT):

       Simultaneous multithreading was first introduced on Power5 offerings, supporting two threads and has been further enhanced in Power7 offerings by allowing four separate threads to run concurrently on the same physical processor core. In the vmstat, with SMT on, the lcpu=2 means you have one core. It’s possible to use mpstat –s to see how the threads are being dispatched.


Virtual Processors

       A virtual processor (VP or VCPU) is a depiction of a physical processor that is presented to the operating system running in a micro-partition. Virtual processors are allocated in whole numbers. Each virtual processor can represent between 0.1 and 1.0 CPUs, known as processing units (PU). So a virtual processor can never consume more than 1.0 physical processor.


In other words, the capacity of a virtual processor will always be equal to or less than the processing capacity of a physical processor. A shared partition can define number of virtual processors up to 10 times the number of processing units assigned to the partition.


Concept of virtual processors:

       virtual processors determine how many cores a partition thinks it has. If 2 virtual processors configured on a partition, it will think it has two physical cores. The number of virtual processors configured for a micro-partition establishes the usable range of processing units. 

For example, a partition with one virtual processor can operate with between 0.1 and 1.0 processing units and with two virtual processors can get between 0.2 and 2.0 processing units. The upper limit of processing capacity, up to which an uncapped micro-partition can grow, is determined by the number of virtual processors that it possesses


For example, if you have a partition with entitled capacity of 0.50 processing units and one virtual processor, the partition cannot exceed 1.00 processing units. However, if the same partition is assigned two virtual processors and processing resources are available in the shared processor pool, the partition can go up to 2.00 processing units (an additional 1.50 processing units) and 4.00 processing units in case of 4 virtual processors


By default, the number of processing units that you specify is rounded up to the minimum whole number of virtual processors needed to satisfy the assigned number of processing units.


 For example:
· If you specify 0.50 processing units, one virtual processor will be assigned.
· If you specify 2.25 processing units, three virtual processors will be assigned.


A micro-partition must have enough virtual processors to satisfy its assigned processing capacity. For example, if a micro-partition has an entitled capacity of 2.5 processing units then the minimum number of virtual processors would be 3


Processing Capacity: Desired, Minimum, and Maximum:


 ·  Minimum, desired, and maximum processing units
 · Minimum, desired, and maximum virtual processors

The desired processing units and desired virtual processor values can be changed dynamically without stopping or reactivating the partition and that’s where minimum and maximum values come into picture.


The minimum and maximum settings for both processing units and virtual processors represent the extremes between which the desired values can be dynamically changed. Maximum value is only used as an upper limit for the dynamic operation and doesn’t play any role in processing capacity allotment for the partition.



Deep understanding about the micro partition:

       A desired value defines a value which you desire or like to have. This is not an ensured processing capacity because there might not be enough capacity in the shared-processor pool. In addition to define a lower boundary for dynamic operations, the minimum value defines a minimum value which must be available in the shared-processor pool for the partition to start, failing which partition will not start.


When a partition is started, preference is given to the desired value you set. When there is enough capacity in the shared-processor pool, the allocated entitled capacity will be equal to the desired value. Otherwise, the entitled capacity will be lower than the desired value, a value greater than or equal to the minimum capacity attribute. If the minimum capacity requirement cannot be met, the micro-partition will not start.
The entitled processor capacity is allocated among the partitions in the sequence the partitions are started. Consider a scenario where a physical shared-processor pool has 2.0 processing units available and there are 3 partitions started in the sequence 


Partitions 1, 2, and 3 with following attributes: -
Partition 1 (Minimum: 0.5, Desired: 1.5, Maximum: 1.8)
Partition 2 (Minimum: 1.0, Desired: 1.5, Maximum: 2.0)
Partition 3 (Minimum: 0.5, Desired: 1.0, Maximum: 1.5)


 Since Partition 1 is started first, it will get the entitled processing capacity of 1.5 because there is enough processing capacity of 2.0 processing units available in the physical-processor pool. Partition2 will not be able to start because after allocating 1.5 processing units to partition 1, only 0.5 processing units are left in the physical processing pool and Partition 2 minimum capacity requirement is greater than that. Partition 3 will get started with entitled capacity of 0.5, which is the capacity left in the physical-processing pool. This value is less than Partition 3’s desired capacity requirement. The allocated capacity entitlements are summarized below:

· Partition 1 will be activated with allocated capacity entitlement of 1.5, which is the desired value. 
· Partition 2 will not start because minimum capacity requirements will not met.
 · Partition 3 will be activated with allocated capacity entitlement of 0.5, which is lesser than the desired value but sufficient enough to start the partition.

note: My sincere thanks to Neeraj.
----------------------------------------------------------------------------------------------------------------------------------