IDLE domain is scheduled more than dom0
Hi, Stephan,
Latest hg tree has set your sEDF scheduler as default, and then
I saw some strange behavior as mentioned in subject on XEN/IA64. The source tree is based on xen-ia64-unstable.hg set up by Dan, which was just newly created yesterday and had default scheduler change as above too.
An example is: (No DomU created)
Total cpu time
IDLE 93def9294f
Dom0 5420288a1b
Shouldn't IDLE domain not be scheduled for most time? Because
idle task will call into PAL for power save on XEN/IA64, the performance is really, really bad to boot Dom0. The net effect is about ten times slower. After adding "sched=bvt", everything back to normal.
I'm not sure whether same problem also exists on x86, maybe not
that obvious. Is there any special sEDF parameter setting to be done arch specific...?
For previous BVT scheduler, the evt (effective virtual time) for
IDLE task is set as -1, which has ideal effect to always schedule Dom0 as long as it's runable. IDLE domain should never be scheduled after Dom0 is up, unless explicit sleep request issued from Dom0.
However after looking into sEDF code, it seems that current
running ED is very likely to be moved into wait queue after a period, while IDLE is always on run queue. Then regarding case with only Dom0 and IDLE, IDLE will be scheduled more frequently than expected, even when dom0 doesn't request to sleep explicitly. When multiple domains exist, that phenomenon is instead not that obvious, since domains will gear to run queue alternatively and prevent IDLE to be scheduled.
So maybe some special consideration should be added to IDLE
domain... I'm actually a stranger to this new scheduler, and please correct me if I throw water on incorrect direction. ;-)
Thanks,
Kevin
Quoted 4 lines
Shouldn't IDLE domain not be scheduled for most time? Because
idle task will call into PAL for power save on XEN/IA64, the performance is really, really bad to boot Dom0. The net effect is about ten times slower. After adding "sched=bvt", everything back to normal.
If the sedf scheduler is scheduling the idle domain when domain0 is runnable, surely this is affecting performance on x86 also and is a bug that should be fixed?
Has anyone done any performance testing (on x86) since sedf was checked in as the default?
Dan
Quoted 6 lines · Dan Magenheimer
Quoted 5 lines
Shouldn't IDLE domain not be scheduled for most time? Because
idle task will call into PAL for power save on XEN/IA64, the performance is really, really bad to boot Dom0. The net effect is about ten times slower. After adding "sched=bvt", everything back to normal.
Quoted 6 lines
If the sedf scheduler is scheduling the idle domain when domain0 is runnable, surely this is affecting performance on x86 also and is a bug that should be fixed?
Has anyone done any performance testing (on x86) since sedf was checked in as the default?
Just tried launching some cpu bound tasks in dom0, and I get only 75% cpu util for dom0. I'll try the other domain scheduler and see if it clears it up.
-Andrew
cpu0: [075.3] d0-0[075.3] cpu1: [075.3] d0-1[075.3] cpu2: [075.3] d0-2[075.3] cpu3: [074.8] d0-3[074.8]
Quoted 11 lines · Andrew Theurer
Quoted 10 lines · Dan Magenheimer
Quoted 5 lines
Shouldn't IDLE domain not be scheduled for most time? Because
idle task will call into PAL for power save on XEN/IA64, the performance is really, really bad to boot Dom0. The net effect is about ten times slower. After adding "sched=bvt", everything back to normal.If the sedf scheduler is scheduling the idle domain when domain0 is runnable, surely this is affecting performance on x86 also and is a bug that should be fixed?
Quoted 6 lines
Quoted 2 lines
Has anyone done any performance testing (on x86) since sedf was checked in as the default?
Just tried launching some cpu bound tasks in dom0, and I get only 75% cpu util for dom0. I'll try the other domain scheduler and see if it clears it up.
OK, just confirmed bvt works as expected in ia32.
-Andrew
I think it's quite likely that by default SEDF doesn't allow domains to use slack CPU time, i.e. non work-conserving. Each domain is given an absolute percentage of the total CPU time. Try use command "xm sedf dom-id 0 0 0 1 0" to give a domain access to slack CPU time. Hopefully this could restore the performance.
BTW, on my uniprocessor test machine with latest xen-unstable, xenlinux 2.6.11.12, domU sees significant drop in network throughputs (~40% less!) I'm interested in whether other people encounter similar situations, especially on SMP machines.
Cheers,
Bin
Quoted 28 lines · Andrew Theurer
Quoted 11 lines · Andrew Theurer
Quoted 10 lines · Dan Magenheimer
Quoted 5 lines
Shouldn't IDLE domain not be scheduled for most time? Because
idle task will call into PAL for power save on XEN/IA64, the performance is really, really bad to boot Dom0. The net effect is about ten times slower. After adding "sched=bvt", everything back to normal.If the sedf scheduler is scheduling the idle domain when domain0 is runnable, surely this is affecting performance on x86 also and is a bug that should be fixed?
Quoted 6 lines
Quoted 2 lines
Has anyone done any performance testing (on x86) since sedf was checked in as the default?
Just tried launching some cpu bound tasks in dom0, and I get only 75% cpu util for dom0. I'll try the other domain scheduler and see if it clears it up.
OK, just confirmed bvt works as expected in ia32.
-Andrew
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
Quoted 9 lines
BTW, on my uniprocessor test machine with latest xen-unstable,
xenlinux 2.6.11.12, domU sees significant drop in network throughputs (~40% less!) I'm interested in whether other people encounter similar situations, especially on SMP machines.
Mhmhm, this is interesting, what are the timing parameters for your domains?
Thanks,
Stephan
Quoted 47 lines · Andrew Theurer
Quoted 28 lines · Andrew Theurer
Quoted 16 lines · Dan Magenheimer
Quoted 13 lines
Quoted 9 lines
Shouldn't IDLE domain not be scheduled for most time? Because
idle task will call into PAL for power save on XEN/IA64, the performance is really, really bad to boot Dom0. The net effect is about ten times slower. After adding "sched=bvt", everything back to normal.If the sedf scheduler is scheduling the idle domain when domain0 is runnable, surely this is affecting performance on x86 also and is a bug that should be fixed?
Quoted 9 lines
Quoted 4 lines
Has anyone done any performance testing (on x86) since sedf was checked in as the default?
Just tried launching some cpu bound tasks in dom0, and I get only 75% cpu util for dom0. I'll try the other domain scheduler and see if it clears it up.
Quoted 11 lines
OK, just confirmed bvt works as expected in ia32.
-Andrew
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
Default SEDF settings. I have never changed any SEDF parameters. It's uniprocessor. With some netback driver instrumentation, I find out that SEDF preempts a lot more aggresive even than BVT. For example, when dom1 is sending data to an external host, during each context switch the number of pages dom0 takes off the Tx ring and delivers to the NIC always (yes, 100% of the time) fall between 1-8. With BVT, 70% of batch-sizes fall between 1-8 with the rest scattered around 20-40. In short, there are too frequent preemption/context switches with SEDF on uniprocessors.
- Bin
Quoted 63 lines · Stephan Diestelhorst
Quoted 9 lines
BTW, on my uniprocessor test machine with latest xen-unstable,
xenlinux 2.6.11.12, domU sees significant drop in network throughputs (~40% less!) I'm interested in whether other people encounter similar situations, especially on SMP machines.
Mhmhm, this is interesting, what are the timing parameters for your domains?
Thanks,
StephanQuoted 47 lines · Andrew Theurer
Quoted 28 lines · Andrew Theurer
Quoted 16 lines · Dan Magenheimer
Quoted 13 lines
Quoted 9 lines
Shouldn't IDLE domain not be scheduled for most time? Because
idle task will call into PAL for power save on XEN/IA64, the performance is really, really bad to boot Dom0. The net effect is about ten times slower. After adding "sched=bvt", everything back to normal.If the sedf scheduler is scheduling the idle domain when domain0 is runnable, surely this is affecting performance on x86 also and is a bug that should be fixed?
Quoted 9 lines
Quoted 4 lines
Has anyone done any performance testing (on x86) since sedf was checked in as the default?
Just tried launching some cpu bound tasks in dom0, and I get only 75% cpu util for dom0. I'll try the other domain scheduler and see if it clears it up.
Quoted 11 lines
OK, just confirmed bvt works as expected in ia32.
-Andrew
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
Quoted 23 lines · Andrew Theurer
Quoted 7 lines · Dan Magenheimer
Quoted 7 lines
Shouldn't IDLE domain not be scheduled for most time? Because
idle task will call into PAL for power save on XEN/IA64, the performance is really, really bad to boot Dom0. The net effect is about ten times slower. After adding "sched=bvt", everything back to normal.Quoted 8 lines
If the sedf scheduler is scheduling the idle domain when domain0 is runnable, surely this is affecting performance on x86 also and is a bug that should be fixed?
Has anyone done any performance testing (on x86) since sedf was checked in as the default?
Just tried launching some cpu bound tasks in dom0, and I get only 75% cpu util for dom0. I'll try the other domain scheduler and see if it clears it up.
Quoted 9 lines
-Andrew
cpu0: [075.3] d0-0[075.3] cpu1: [075.3] d0-1[075.3] cpu2: [075.3] d0-2[075.3] cpu3: [074.8] d0-3[074.8]
This is the current default behaviour of domain 0, it gets 75% of the CPU time and no slack time. This is easily changeable, and I guess it is usefull to do so!
Stephan
Quoted 3 lines · Stephan Diestelhorst
This is the current default behaviour of domain 0, it gets 75% of the CPU time and no slack time. This is easily changeable, and I guess it is usefull to do so!
The default for all domains should be that they are eligible for slack time. Alternatively (or perhaps additionally), CPU time should be given to ineligible domains in preference to idling the CPU. There's no good reason for the scheduler not to be work conserving, even if no domains are marked as wanting slack time.
-- Keir