All of lore.kernel.org
 help / color / mirror / Atom feed
* Does Xen scheduler preserves 5% of its utilization to every VM?
@ 2010-09-14  6:16 walmart
  2010-09-14  6:23 ` walmart
  2010-09-14  9:14 ` George Dunlap
  0 siblings, 2 replies; 4+ messages in thread
From: walmart @ 2010-09-14  6:16 UTC (permalink / raw)
  To: xen-devel

Hi, all

I was trying to write a Xen scheduler, it is a fixed priority one and
would give domain 1 higher priority than domain 2. (which means
whenever domain 1 is runnable, it got the cpu to run).

I got two domains running. It is on Fedora 13, 64 bit, Xen 4.0.1.

domain 1 and doman 2 both only have one vcpu, and are pinned to the same core.

The strange thing is:

domain 1 is busy, domain 2 is idle, domain 1 got 95% of the cpu;
domain 1 is idle, domain 2 is busy, domain 2 got 95% of the cpu;
domain 1 is busy, domain 2 is busy, domain 1 got 95% of the cpu, while
domain 2 got the remaining 5%.

I checked the schedule() function again and again, still couldn't
figure out why would this happen.

Could anyone give me some hint?


thanks very much!

Best!

Sam

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Does Xen scheduler preserves 5% of its utilization to every VM?
  2010-09-14  6:16 Does Xen scheduler preserves 5% of its utilization to every VM? walmart
@ 2010-09-14  6:23 ` walmart
  2010-09-14  9:14 ` George Dunlap
  1 sibling, 0 replies; 4+ messages in thread
From: walmart @ 2010-09-14  6:23 UTC (permalink / raw)
  To: xen-devel

Hi, all:

I just noticed credit based scheduler have the same behavior. Except
when I set two domains both busy, the utilization for them is both
50%.

Can anyone tell me why a single VCPU can only get 95% of the core,
while two VCPUs can get 100% of it?

I am really confused by this...

Thanks very much!

best!

Sam



On Tue, Sep 14, 2010 at 1:16 AM, walmart <vmwalmart@gmail.com> wrote:
> Hi, all
>
> I was trying to write a Xen scheduler, it is a fixed priority one and
> would give domain 1 higher priority than domain 2. (which means
> whenever domain 1 is runnable, it got the cpu to run).
>
> I got two domains running. It is on Fedora 13, 64 bit, Xen 4.0.1.
>
> domain 1 and doman 2 both only have one vcpu, and are pinned to the same core.
>
> The strange thing is:
>
> domain 1 is busy, domain 2 is idle, domain 1 got 95% of the cpu;
> domain 1 is idle, domain 2 is busy, domain 2 got 95% of the cpu;
> domain 1 is busy, domain 2 is busy, domain 1 got 95% of the cpu, while
> domain 2 got the remaining 5%.
>
> I checked the schedule() function again and again, still couldn't
> figure out why would this happen.
>
> Could anyone give me some hint?
>
>
> thanks very much!
>
> Best!
>
> Sam
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Does Xen scheduler preserves 5% of its utilization to every VM?
  2010-09-14  6:16 Does Xen scheduler preserves 5% of its utilization to every VM? walmart
  2010-09-14  6:23 ` walmart
@ 2010-09-14  9:14 ` George Dunlap
  2010-09-15  4:09   ` walmart
  1 sibling, 1 reply; 4+ messages in thread
From: George Dunlap @ 2010-09-14  9:14 UTC (permalink / raw)
  To: walmart; +Cc: xen-devel

Are these PV domains, or HVM domains?

If they're HVM domains, by necessity they will be doing QEMU
operations.  When doing qemu operations, they block and dom0 is
scheduled.  This blocking would allow the lower-priority VM space to
run.

Your best bet is to use xentrace + xenalyze to see what's going on
with scheduling.  You can find xenalyze here:
 http://xenbits.xensource.com/ext/xenalyze.hg

 -George

On Tue, Sep 14, 2010 at 7:16 AM, walmart <vmwalmart@gmail.com> wrote:
> Hi, all
>
> I was trying to write a Xen scheduler, it is a fixed priority one and
> would give domain 1 higher priority than domain 2. (which means
> whenever domain 1 is runnable, it got the cpu to run).
>
> I got two domains running. It is on Fedora 13, 64 bit, Xen 4.0.1.
>
> domain 1 and doman 2 both only have one vcpu, and are pinned to the same core.
>
> The strange thing is:
>
> domain 1 is busy, domain 2 is idle, domain 1 got 95% of the cpu;
> domain 1 is idle, domain 2 is busy, domain 2 got 95% of the cpu;
> domain 1 is busy, domain 2 is busy, domain 1 got 95% of the cpu, while
> domain 2 got the remaining 5%.
>
> I checked the schedule() function again and again, still couldn't
> figure out why would this happen.
>
> Could anyone give me some hint?
>
>
> thanks very much!
>
> Best!
>
> Sam
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xensource.com
> http://lists.xensource.com/xen-devel
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Does Xen scheduler preserves 5% of its utilization to every VM?
  2010-09-14  9:14 ` George Dunlap
@ 2010-09-15  4:09   ` walmart
  0 siblings, 0 replies; 4+ messages in thread
From: walmart @ 2010-09-15  4:09 UTC (permalink / raw)
  To: George Dunlap; +Cc: xen-devel

[-- Attachment #1: Type: text/plain, Size: 2566 bytes --]

Hi, George:

Thanks for your reply! I am using PV domains. Even if I am using the
default credit based scheduler, the same situation happens.

Please allow me to restate my situation:
Fedora 13, 64bit, compiled Xen 4.0.2 from source code. On a 4 core
machine, domain 0 is pinned to core 1.

I configured domain 1 to have 1 vcpu, and pinned it to core 1.

I am running a busy loop in domain 1.

The xm top in domain 0 shows domain 1 only get exactly 95% of the CPU.

I traced the data for 10 secs. (when only domain 1 was running,
occupying 95% of the cpu). using:
 xentrace -D -e 0x2f000 -S 256 -T 10 trace_credit_sched

I then traced the data for another 10 secs, with domain 1 and 2 both
running busy, occupying 50% of the cpu. using:
 xentrace -D -e 0x2f000 -S 256 -T 10 trace_credit_sched_both

But I don't know how to use xenalyze... Could you help me w/ the trace?

Thanks very much!

Best!

Sam


On Tue, Sep 14, 2010 at 4:14 AM, George Dunlap <dunlapg@umich.edu> wrote:
> Are these PV domains, or HVM domains?
>
> If they're HVM domains, by necessity they will be doing QEMU
> operations.  When doing qemu operations, they block and dom0 is
> scheduled.  This blocking would allow the lower-priority VM space to
> run.
>
> Your best bet is to use xentrace + xenalyze to see what's going on
> with scheduling.  You can find xenalyze here:
>  http://xenbits.xensource.com/ext/xenalyze.hg
>
>  -George
>
> On Tue, Sep 14, 2010 at 7:16 AM, walmart <vmwalmart@gmail.com> wrote:
>> Hi, all
>>
>> I was trying to write a Xen scheduler, it is a fixed priority one and
>> would give domain 1 higher priority than domain 2. (which means
>> whenever domain 1 is runnable, it got the cpu to run).
>>
>> I got two domains running. It is on Fedora 13, 64 bit, Xen 4.0.1.
>>
>> domain 1 and doman 2 both only have one vcpu, and are pinned to the same core.
>>
>> The strange thing is:
>>
>> domain 1 is busy, domain 2 is idle, domain 1 got 95% of the cpu;
>> domain 1 is idle, domain 2 is busy, domain 2 got 95% of the cpu;
>> domain 1 is busy, domain 2 is busy, domain 1 got 95% of the cpu, while
>> domain 2 got the remaining 5%.
>>
>> I checked the schedule() function again and again, still couldn't
>> figure out why would this happen.
>>
>> Could anyone give me some hint?
>>
>>
>> thanks very much!
>>
>> Best!
>>
>> Sam
>>
>> _______________________________________________
>> Xen-devel mailing list
>> Xen-devel@lists.xensource.com
>> http://lists.xensource.com/xen-devel
>>
>

[-- Attachment #2: trace_credit_sched --]
[-- Type: application/octet-stream, Size: 319092 bytes --]

[-- Attachment #3: trace_credit_sched_both --]
[-- Type: application/octet-stream, Size: 333912 bytes --]

[-- Attachment #4: Type: text/plain, Size: 138 bytes --]

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-09-15  4:09 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-09-14  6:16 Does Xen scheduler preserves 5% of its utilization to every VM? walmart
2010-09-14  6:23 ` walmart
2010-09-14  9:14 ` George Dunlap
2010-09-15  4:09   ` walmart

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.