On Wed, Sep 29, 2010 at 7:30 PM, Frank M. Ramaekers
<framaek...@ailife.com> wrote:
>
> This was stated on the z/VSE LISTSERV, can someone confirm (or deny) it?

> Here is a quick tip. When running under VM with multiple VSE's it is usually 
> NOT a good idea to define multiple CPU's to VSE and expect turbo dispacher to 
> handle them. Why? Because z/VM will not dispach a VSE unless it has ALL 
> requested CPU available. Often VSE could be running but is waiting for z/VM 
> to find a secind free CPU.

As stated here, we can simply conclude and demonstrate that this claim
is not true. The more interesting part is to understand which
statement *is* true and how that led to this rumor ;-)

In general, it's a bad idea to have more virtual CPUs than you can get
from z/VM when you have workload to use them. The total number of
logical CPUs in z/VM is an upper bound for what you can get, but when
you run 100 Linux guests on 5 IFLs, it's unlikely you find a guest
have all its 5 virtual CPUs dispatched at the same time.

One of the challenges with virtualized multi-processor guests is about
locking. When the virtual CPU holding the lock is not dispatched, the
other virtual CPU ends up spinning waiting for the other virtual CPU
to free the lock (which does not happen because you're burning a CPU
spinning). To avoid that, the guest OS uses a "voluntary time slice
end" DIAG44 to give up running and expect the other virtual CPU to get
time to free the lock. Linux is even using a later version of that to
tell z/VM which virtual CPU should be put in front of the queue (with
more than 2 virtual CPUs "other" is a bit vague). I don't know how
much locking is done in VSE.

Another aspect is about SMP. Linux is "symmetrical" and does not care
which virtual CPU runs what. Some Operating Systems deal with
serialization by "master only" tasks. z/VM used to have a lot of that
in ancient past, and got rid of almost all now. When the guest OS
needs some work to run on one particular CPU (the master) but
dispatches work on both virtual CPUs, you can't pick which one is
dispatched first by z/VM. The question would be whether VSE has much
master only work.

Rob
-- 
Rob van der Heij
Velocity Software
http://www.velocitysoftware.com/

Reply via email to