WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] Question about the ability of credit scheduler to handle

To: Yuehai Xu <yuehaixu@xxxxxxxxx>
Subject: Re: [Xen-devel] Question about the ability of credit scheduler to handle I/O and CPU intensive VMs
From: George Dunlap <George.Dunlap@xxxxxxxxxxxxx>
Date: Tue, 5 Oct 2010 15:16:52 +0100
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx, yhxu@xxxxxxxxx
Delivery-date: Tue, 05 Oct 2010 07:17:52 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:sender:received :in-reply-to:references:date:x-google-sender-auth:message-id:subject :from:to:cc:content-type:content-transfer-encoding; bh=08qzyrJkTgqqMem7ysiBs/qyQS8kCzuYwt08HEJX0vs=; b=wWeLxOTE2R0gEtczJAdJjTgZ0zDfD2JsQYBv4GVv8ZEIO35yIgt9ICu2fXs43/EuXa 6lNbrhsbrXO4dCSsEeuKn2YnTB6JBYx5Uc9oeDCjcaxT5iBvKN9N+QQx4UTn9zwPC63B R+v5GQVYqUpRGkZBeKg5hLuNrfGt7u3CNwISo=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=rmzbu/CVrTrfE9vOgTchPiXAWVmM4ALDUAfvS/Fec7hn36m5NtCM5rMohXOr4dSsV4 mXZdtjxEXkAG/F1PeansO4aRtHhTaFhG0q+3f1pYIU4UKq87o4t97ZvlqpLtUrJbPXIJ oFJJyl9k9FX44kFmaFxThxNoon1jm/PxB0x4k=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <AANLkTimYTbf5meNptCtuiKWfQGd_qSNCkbCNabfREc_0@xxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <AANLkTi=Ro24zg-yDPk1+=c0XsZSe2kNn8Gk07Bu4x0WN@xxxxxxxxxxxxxx> <AANLkTin9E1m_jFcj4Ak7nB9OxcQynrznpQ_nNPi_U7hN@xxxxxxxxxxxxxx> <AANLkTikBWZdpOviSEQSNi_pf66A+zYW8FyQVjiCX8ojm@xxxxxxxxxxxxxx> <AANLkTi=Oa0_=vXrr63eALBU2sQa3aLV0NiQHt8hPPvcw@xxxxxxxxxxxxxx> <AANLkTimYTbf5meNptCtuiKWfQGd_qSNCkbCNabfREc_0@xxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
On Tue, Oct 5, 2010 at 3:52 AM, Yuehai Xu <yuehaixu@xxxxxxxxx> wrote:
> However, I stop one of the CPU intensive program in a DomU while keep
> the other running, the results are:
> .....
> <  0.327815345 |x d1v0> (dom: 1) --> (dom: 2) vruntime : 1542607)
> <  0.327906620 -x d2v0> (dom: 2) --> (dom: 1) vruntime : 109521)
> <  0.344349033 |x d1v0> (dom: 1) --> (dom: 2) vruntime : 19779544)
> <  0.344377129 -x d2v0> (dom: 2) --> (dom: 1) vruntime : 33528)
> <  0.344570662 |x d1v0> (dom: 1) --> (dom: 2) vruntime : 232540)
> <  0.344643933 -x d2v0> (dom: 2) --> (dom: 1) vruntime : 87857)
> <  0.345009170 |x d1v0> (dom: 1) --> (dom: 2) vruntime : 439081)
> <  0.345034387 -x d2v0> (dom: 2) --> (dom: 1) vruntime : 30059)
> <  0.369973183 -x d1v0> (dom: 1) --> (dom: 1) vruntime : 30000506)
> <  0.392423279 |x d1v0> (dom: 1) --> (dom: 2) vruntime : 27006658)
> ....
>
> Here I am gotten confusing, since my algorithm of scheduling is very
> simple, every VM should have 30ms of PCPU, however, from the results,
> the time for
> each VCPU to have PCPU is quite unstable. I think somewhere, the
> routine of schedule() should be invoked frequently, and from xentop,
> the VM with CPU
> intensive occupies PCPU almost at 97%.

Idle VMs are never 100% idle; there are a lot of "maintenance" tasks
still to be done.

Your mostly-idle domain (domain 2) seems to be running for pretty
short periods of time -- less than 100us.  That's pretty reasonable.

The question to ask is, what happens when domain 2 wakes up -- is it
put on the runqueue, waiting for the running domain to finish its
timeslice?  Or is it run immediately?  Given the trace you give here,
I would guess that it's run immediately.  If that's not what you
expect, you need to figure out why it's doing that and make it do
something else. :-)

 -George

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel