Skip to contentSkip to conversation

credit1 scheduler question.

DISCUSSION Konrad Rzeszutek Wilk 5 participants 6 messages Feb 7, 2012 – Feb 9, 2012

lore
Share & tools
lore
#0 lore raw

Hey George,

I was wondering if you could explain in simple terms how the scheduler would handle per-physical CPU when there are say 16 guests (each guest is using one VCPU), 32 physical CPUs and dom0 is not restricted to any CPUs. Would the scheduler per physical CPU schedule: guest, dom0, guest, dom0, and so on; or would it be more random? (I assume that both guest and dom0 would do a hypercall yield too).

Thanks!

#1 lore raw
Quoted 8 lines · Konrad Rzeszutek Wilk

Hey George,

I was wondering if you could explain in simple terms how the scheduler would handle per-physical CPU when there are say 16 guests (each guest is using one VCPU), 32 physical CPUs and dom0 is not restricted to any CPUs. Would the scheduler per physical CPU schedule: guest, dom0, guest, dom0, and so on; or would it be more random? (I assume that both guest and dom0 would do a hypercall yield too).

The scheduling would be random. As far as I know, none of the schedulers (sedf, credit1, or credit2) treat domain 0 differently from any other domain. Even guests which are very busy end up blocking quite a bit, so the total runtime ends up being fairly random anyway. Also, the dom0 vcpus are not pinned unless you specify dom0_pin_vcpus on the xen command-line; so by default they will migrate freely around the various cores.

Does that answer your question?

-George

#2 lore raw
Quoted 19 lines · George Dunlap
Quoted 8 lines · Konrad Rzeszutek Wilk

Hey George,

I was wondering if you could explain in simple terms how the scheduler would handle per-physical CPU when there are say 16 guests (each guest is using one VCPU), 32 physical CPUs and dom0 is not restricted to any CPUs. Would the scheduler per physical CPU schedule: guest, dom0, guest, dom0, and so on; or would it be more random? (I assume that both guest and dom0 would do a hypercall yield too).

The scheduling would be random. As far as I know, none of the schedulers (sedf, credit1, or credit2) treat domain 0 differently from any other domain. Even guests which are very busy end up blocking quite a bit, so the total runtime ends up being fairly random anyway. Also, the dom0 vcpus are not pinned unless you specify dom0_pin_vcpus on the xen command-line; so by default they will migrate freely around the various cores.

Quoted 2 lines

Does that answer your question?

I don't know if it's relevant to this discussion but I tend to often increase the credit scheduler weight of dom0 vcpus to guarantee smooth operation of dom0.

http://wiki.xen.org/wiki/Xen_Best_Practices

-- Pasi

#3 lore raw
Quoted 2 lines · Pasi Kärkkäinen

I don't know if it's relevant to this discussion but I tend to often increase the credit scheduler weight of dom0 vcpus to guarantee smooth operation of dom0.

In fact, XenServer has a patch that will automatically adjust dom0's weight based on the weight of other VMs running on the system, in an attempt to make sure dom0 can get enough cpu time.

I haven't submitted it to the list, because I don't think it's really appropriate for the open-source tree. But I'll dig it out and post it as an RFC; even if it's not ultimately accepted, it might not be bad to have the patch floating around.

-George

#4 lore raw
Quoted 4 lines · George Dunlap

In fact, XenServer has a patch that will automatically adjust dom0's weight based on the weight of other VMs running on the system, in an attempt to make sure dom0 can get enough cpu time.

The only problem with approaches like this is what is "enough", and how can we be sure that what's enough for someone is not too few and/or too much for someone else. :-)

That being said (just my 2 cents)...

Quoted 5 lines

I haven't submitted it to the list, because I don't think it's really appropriate for the open-source tree. But I'll dig it out and post it as an RFC; even if it's not ultimately accepted, it might not be bad to have the patch floating around.

Yeah, it would be interesting to at least see it.

Dario

Signature · 4 lines
<<This happens because I choose it to happen!>> (Raistlin Majere)
-------------------------------------------------------------------
Dario Faggioli, Ph.D, http://retis.sssup.it/people/faggioli
Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK)

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#5 lore raw
Quoted 1 line · Dario Faggioli

Yeah, it would be interesting to at least see it.

FYI, posted to xen-unstable an hour ago.

-George