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] Credit Scheduler not working correct (3.0.4-0)

To: Emmanuel Ackaouy <ack@xxxxxxxxxxxxx>
Subject: Re: [Xen-devel] Credit Scheduler not working correct (3.0.4-0)
From: Timo Benk <timo.benk@xxxxxx>
Date: Thu, 01 Feb 2007 12:06:24 +0100
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Thu, 01 Feb 2007 03:06:07 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <6621e55b1d132c29e9a45bc307f9a127@xxxxxxxxxxxxx>
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/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Openpgp: id=67E2E5E9; url=http://m28s01.vlinux.de/timo_benk_gpg_key.asc
References: <45C1B735.3020904@xxxxxx> <6621e55b1d132c29e9a45bc307f9a127@xxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 1.5.0.9 (X11/20061206)
Emmanuel Ackaouy wrote:
> If you have access to the Xen console, can you send output of
> the 'r' (runq) key while your domains are each getting 50% of
> CPU? Just take a few snapshots a few seconds apart. That would
> confirm the theory.
Sorry, but i dunno how to do that? Can you give me a hint?

> Also, setting cap=100 on a UP guest is pointless. Just leave it
> as zero. A VCPU isn't going to get more than 100% of a physical
> CPU anyway.
Yepp, you are right. The reason i have done this was 'cause i want
to demonstrate the credit-scheduler.

If both domains have one vcpu, managed by Xen and i set the following:
Domain-0:~ # xm sched-credit -d xendom1
{'cap': 100, 'weight': 200}
Domain-0:~ # xm sched-credit -d xendom2
{'cap': 100, 'weight': 100}

Both domain are running at 100 percent cpu, but on different pcpus.
That is correct, but does not demonstrate how to use the credit scheduler.

Ok, the other advice from Atsushi was to give one domain two vcpus, the other 
one vcpu,
both with the same weight and all vcpus pinned to the same pcpu. That does not 
help
either. Both domains are still running at 50 percent.

Even if i set the weight of xendom1, resp. xendom2 to be twice as the value
of xendom2, resp. xendom1, i get the same result.

Here is what i have done:

Domain-0:~ # xm vcpu-list
Name                              ID  VCPU   CPU State   Time(s) CPU Affinity
Domain-0                           0     0     1   ---      46.1 any cpu
Domain-0                           0     1     1   r--      28.5 any cpu
xendom1                            1     0     0   r--     558.7 0
xendom2                            3     0     0   -b-      21.6 0
xendom2                            3     1     0   ---     256.0 0

Domain-0:~ # xm sched-credit -d xendom1
{'cap': 0, 'weight': 256}

Domain-0:~ # xm sched-credit -d xendom2
{'cap': 0, 'weight': 256}

3 domains: 2 running, 0 blocked, 0 paused, 0 crashed, 0 dying, 0 shutdown
Mem: 2612284k total, 2603856k used, 8428k free    CPUs: 2 @ 2992MHz
      NAME  STATE   CPU(sec) CPU(%)     MEM(k) MEM(%)  MAXMEM(k) MAXMEM(%) 
VCPUS NETS NETTX(k) NETRX(k) VBDS   VBD_OO   VBD_RD   VBD_WR SSID
  Domain-0 -----r         85    1.6    2048256   78.4   no limit       n/a     
2    4      163      139    0        0        0        0    0
   xendom1 ------        566   49.0     262144   10.0     532480      20.4     
1    1        5       29    2        0       10      539    0
   xendom2 -----r        285   51.0     262144   10.0     262144      10.0     
2    1        6       17    2        0     4622     1772    0

Greetings,
-timo

> On Feb 1, 2007, at 10:47, Timo Benk wrote:
>> Hi,
>>
>> on my system, it seems that the credit scheduler does not work as
>> expected. The
>> problem seems to be related to HyperThreading, if i switch off HT in
>> the BIOS
>> Setup, the scheduler works as expected.
>>
>> I have two domains running, both pinned to the same processor:
>>
>> Domain-0:~ # xm vcpu-list
>> Name                              ID  VCPU   CPU State   Time(s) CPU
>> Affinity
>> Domain-0                           0     0     1   ---      30.2 any cpu
>> Domain-0                           0     1     1   r--      12.0 any cpu
>> xendom1                            1     0     0   ---      98.6 0
>> xendom2                            2     0     0   r--     110.3 0
>>
>> Both domains should consume max. 100 Percent of that processor, but
>> xendom1 has a weight twice as big as xendom2:
>>
>> Domain-0:~ # xm sched-credit -d xendom1
>> {'cap': 100, 'weight': 200}
>> Domain-0:~ # xm sched-credit -d xendom2
>> {'cap': 100, 'weight': 100}
>>
>> In my understanding of the credit scheduler, xendom1 should get twice as
>> much CPU-time as xendom2. But:
>>
>> xentop - 11:05:46   Xen 3.0.4-0
>> Mem: 2612284k total, 2603852k used, 8432k free    CPUs: 2 @ 2992MHz
>>       NAME  STATE   CPU(sec) CPU(%)  [...]
>>   Domain-0 -----r         42    0.6  [...]
>>    xendom1 ------        122   49.8  [...]
>>    xendom2 -----r        133   50.2  [...]
>>
>> As you can see, both domains got an equal amount of the CPU.
>>
>> Am i missing something or do i understand something wrong?
>>
>> Greetings,
>> -timo
>> -- 
>> Timo Benk - Jabber ID: fry@xxxxxxxxxxxx - ICQ ID: #414944731
>> PGP Public Key: http://m28s01.vlinux.de/timo_benk_gpg_key.asc
>>
>>
>> _______________________________________________
>> Xen-devel mailing list
>> Xen-devel@xxxxxxxxxxxxxxxxxxx
>> http://lists.xensource.com/xen-devel
>>
> 


-- 
Timo Benk - Jabber ID: fry@xxxxxxxxxxxx - ICQ ID: #414944731
PGP Public Key: http://m28s01.vlinux.de/timo_benk_gpg_key.asc


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