Rob and Les wrote:

On Sat, Feb 19, 2011 at 12:17 AM, Les Koehler <vmr...@tampabay.rr.com> 
wrote:
> Is a logical cpu equivalent to a physical cpu? I realize that the h/w 
now
> has multiple physical cpus, but I was brought up on System/360 and never
> have quite grokked how it is all controlled and accounted for!

>z/VM itself runs in an LPAR under control of PR/SM. And just like z/VM
>does for virtual machines, PR/SM will dispatch the LPAR's logical CPUs
>on any physical CPU as it sees fit. Even when you have a dedicated
>CPU, it's PR/SM who decides which physical CPU is dedicated to that
>logical CPU (for almost all the time).

>And we're not even talking about hot-sparing of CPUs....  You're in a
>maze and all CPUs look the same .... ;-)



So then, suppose we state the problem In terms of PR/SM which is really 
just VM, the SIE (Start Interpretive Execution) instruction in firmware 
where LPARs become similar to Guest Machines.

It is somewhat of an oversimplification though conceptually analogous.

In terms of PR/SM:

Logical CPs (LCPs) vs Physical CPs (PCPs) are simply a way of sharing the 
PCPs across the LPARs with a weighting factor.

The PR/SM Planning Guide, Volume A05:  3.2.10.4 says it best.

But in the following discussion be sure not to confuse logical partition 
(LP or LPAR) which is equivalent to a Guest Machine with a logical CP 
(LCP) which is equivalent to a virtual CP (VCP).

When logical partitions(LPs) are dispatched then, and only then, will 
their logical CPs(LCPs) also get dispatched to physical CPs (PCPs). 

In the following excerpt, whenever you read logical partition think Guest 
Machine and whenever you read logical CP think virtual CP (VCP):

Excerpt:

Use of Processing Weights:  Processing weights can range from 1 to 999
 
   °   The processing weights for all active, sharing logical partitions 
are added together.  This total is considered to be 100% of the processing 
resource available to shared processors.  For example, the total 
processing weights for the logical partitions shown in Figure 52 in topic 
3.3.4.1 is 1,300.

   °   The share of processing resources for each logical partition is 
calculated by dividing the processing weight for each sharing logical 
partition by the total processing weight.  For example, at peak CP 
utilization levels, the dispatcher allocates shared processing resources 
to each of the logical partitions in Figure 52 in topic 3.3.4.1 as 
follows:

                         DOSVSE   300/1300 = 23.1%
                         MVSTEST  100/1300 =  7.7%
                         VMHPO    900/1300 = 69.2%

   °   The share of processing resource for each online logical processor 
is calculated by dividing the share for each logical partition by the 
number of online logical processors.  For the logical partitions shown in 
Figure 52 in topic 3.3.4.1, the share for each logical processor is as 
follows:

                         DOSVSE     23.1/1 CP  = 23.1%
                         MVSTEST     7.7/6 CPs =  1.3%
                         VMHPO      69.2/2 CPs = 34.6%


Processing weights are used to specify the portion of the shared processor 
resources allocated to a logical partition.  Although PR/SM always manages 
sharing logical partitions according to the specified processing 
weights,there are times when a logical partition will receive either more 
or less than its processing share:

   °   A logical partition will receive more than its processing share 
when there is excess processor capacity, provided it has work to do and 
other logical partitions are not using their share.

   °   A logical partition will receive less than its processing share 
when its workload demand drops below the capacity specified by its weight.

   °   A logical partition will not receive more than its processing share 
when the processing resources for that logical partition are capped.

   The recommended procedure is to specify processing weights to satisfy 
the peak requirements of the logical partitions.

End of excerpt:

In the above example, although there are 9 LCPs with 900% CPU 
theoretically, in practice the would be allocated across the number of 
PCPs be it 1, 2, 6 or whatever..

And so the important factor is no what % of phyiscal CP (PCP) bu what % of 
logical CPU is being realized in each LPAR, Guest Machine.





Les Koehler <vmr...@tampabay.rr.com> 
Sent by: The IBM z/VM Operating System <IBMVM@LISTSERV.UARK.EDU>
02/18/2011 06:17 PM
Please respond to
The IBM z/VM Operating System <IBMVM@LISTSERV.UARK.EDU>


To
IBMVM@LISTSERV.UARK.EDU
cc

Subject
Re: VM Total time in $ACCOUNT files






Is a logical cpu equivalent to a physical cpu? I realize that the h/w now 
has 
multiple physical cpus, but I was brought up on System/360 and never have 
quite 
grokked how it is all controlled and accounted for!

Les

Rob van der Heij wrote:
> On Fri, Feb 18, 2011 at 11:50 PM, Ackerman, Derek
> <derek.acker...@infocrossing.com> wrote:
> 
>> I am simply summing the total CPU times for each CP, for my report I 
keep them separate, here is an example.
> 
> I believe you're confusing virtual CPUs with logical CPUs.
> 
> The CPU number in your account record is for the virtual CPU of the
> guest (with exception of the SYSTEM record). A virtual CPU is not tied
> to a logical CPU, so your UNIPROD's CPU 00 gets dispatched on logical
> CPU 00, 01 or 02 as z/VM likes.
> It is even possible for a single virtual CPU to consume more cycles
> than the average of any of your logical CPUs (when it hopped from one
> to the other).
> 
> Rob

Reply via email to