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

[Xen-devel] domU config file options for scheduling

To: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] domU config file options for scheduling
From: Thomas Goirand <thomas@xxxxxxxxxx>
Date: Thu, 10 Dec 2009 15:58:24 +0800
Cc: George Dunlap <George.Dunlap@xxxxxxxxxxxxx>
Delivery-date: Wed, 09 Dec 2009 23:59:00 -0800
Dkim-signature: v=1; a=rsa-sha1; c=relaxed; d=goirand.fr; h=message-id :date:from:mime-version:to:cc:subject:content-type: content-transfer-encoding; s=postfix; bh=UpH8s0awlDvAVaPshc5Qwwl Kqhs=; b=Tqz20x6pXfzmpGqXgRKkKKHz1QTFBHfgdXZcLMEW1d+3FlFWQO0pxAW tjbyW9CiufJfs8m/ORVeAlYa15tRho3b3h5VrM+AyuMiVnlCICvsLPIjHVlcvLpK JnWjlawG5MPFEQz+ZnoLLP+e0DO+y2xGpOzQxP81XIeN+DHnnWZE=
Domainkey-signature: a=rsa-sha1; c=nofws; d=goirand.fr; h=message-id:date :from:mime-version:to:cc:subject:content-type: content-transfer-encoding; q=dns; s=postfix; b=aUUHQgapfCKOYw0jn EOcY8afTpspWtLYgt8dmmMYpaYFMGz6r7dcwAlmOI0FCkBY5cmJ2prI8Nw9zIUfA ORbCiERArBLyEcnJhh3/10VFHc+Ho6pB5Qyf8b56WgmRWgbtJCWH3ihkTWGkQikc qH/J4TKaxnRHT8pmJ+bx7bseY8=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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>
Openpgp: id=98EF9A49
Organization: GPLHost
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mozilla-Thunderbird 2.0.0.22 (X11/20090707)
Hi,

This is addressed mainly to George, but maybe someone else want to work
on it too.

I found very inconvenient to have to do:

xm sched-credit -d xen08 -c 50

after a VM starts, and I think there should be some configuration values
to be added into the startup file. Something like:

shedcreditweight = 20
shedcreditcap = 50

would be really useful and save a load of scripting work for everyone
(avoiding shell scripts to run after a VM is started).

George, would you have time to implement this? Any chance to have this
added for the 4.0 release? That'd be really a GREAT addition, with I
believe, minimum effort.

Also, I had a chat with George about having a kind of "burst" feature
added to the credit scheduler. My idea is that, by default, someone
would setup a credit-burst-time, and a credit-burst-cap, to any VM that
has a a credit-cap set. That could be set this way in the domU config file:

shedcreditweight = 20
shedcreditcap = 50
shedbursttime = 5000 <--- 5 seconds max burst CPU time
shedburstcap = 80 <--- 80% CPU max during the burst
shedrecovertime = 2000 <--- 2 second recovery time

Whenever a VM goes over its shedcreditcap, the burst-cap would be used
for a time no longer than the credit-burst-time. When this time is over,
then shedcreditcap would be used, until the VM uses less than
shedcreditcap for a time longer than shedrecovertime.

I do believe that this kind of scheduling would be REALLY useful for
avoiding that a VM abuses the CPU usage. For people doing Xen VM hosting
business, or cloud computing, that would be just great. The values that
I wrote above would be a typical use.

I had a look myself in the scheduler code, and it's quite not obvious
where to patch. I think I have understood the burncredit() system, but I
didn't get where the values are read for the cap and all. Did I
understood well that Xen uses 30ms cycles for the credit scheduler? If
that is the case, then I believe that computing what cap values to use
depending on the burst parameters for a given 30ms scheduling cycle
wouldn't be such a big overhead.

If nobody wants to implement this, can someone gives me some pointers in
the sched_credit.c and all the .h structures? If I do stupid trials and
errors in my implementation at first, because I'd be a beginner at
patching Xen, would you guys have enough time to explain, and excuse a
newbie? Would that kind of patch be accepted if proven to work?

Cheers,

Thomas Goirand

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

<Prev in Thread] Current Thread [Next in Thread>