On Wed, Feb 5, 2014 at 5:49 AM, David Boyes <[email protected]> wrote:

> your dispatch timeslice for the whole virtual machine is divided as
> equally as possible between the # of virtual CPUs defined, so defining more
> virtual CPUs actually DECREASES the amount of processing time available to
> each virtual CPU per timeslice


That is not really correct. If that was true, you'd never be able to go
over 100%. Each virtual CPU is separately dispatchable and competes with
all other VCPUs from all other guests for a timeslice on a logical
processor. SHARE value is taken into account by dispatcher to determine the
relative priority of all VCPUs for that guest. That will determine how
often in a given period of time will that guest get a timeslice on any of
its VCPUs. If you want to turn single-VCPU guest into a multi-VCPU one, you
need to multiply the relative SHARE value by the number of VCPUs that you
defined for a guest in hope that each VCPU gets about the same number of
timeslices in a given period of time as the single one was getting on a
single-VCPU guest.

Adding a virtual CPUs to a guest increases the ratio of total number of
VCPUs per logical processor and puts unnecessary burden on dispatcher if it
(additional VCPU) is not effectively used. There is a finite number of time
slices on all logical processors put together and with more VCPUs, the
competition for those timeslices is higher. You should add another VCPU to
a guest only if the processes running in it can effectively use it.

Let's not forget that if you run in a LPAR that uses shared physical
processors, then LPAR's logical processors compete for a timeslice (or
"running time") on a physical processor with other LPARs that use shared
processors. CPU percentages may be misleading in that environment unless
you have a good monitoring tool. CPU seconds per minute may be a better
gauge.

Ivica Brodaric

----------------------------------------------------------------------
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390
----------------------------------------------------------------------
For more information on Linux on System z, visit
http://wiki.linuxvm.org/

Reply via email to