Message ID | 20190914085251.18816-1-jgross@suse.com (mailing list archive) |
---|---|
Headers | show |
Series | xen: add core scheduling support | expand |
On 14.09.2019 10:52, Juergen Gross wrote: > This is achieved by switching the scheduler to no longer see vcpus as > the primary object to schedule, but "schedule units". Each schedule > unit consists of as many vcpus as each core has threads on the current > system. The vcpu->unit relation is fixed. There's another aspect here that, while perhaps obvious, I didn't realize so far: Iirc right now schedulers try to place vCPU-s on different cores, as long as there aren't more runnable vCPU-s than there are cores. This is to improve overall throughput, since vCPU-s on sibling hyperthreads would compete for execution resources. With a fixed relation this is going to be impossible. Otoh I can of course see how, once we have proper virtual topology, this allows better scheduling decisions inside the guest, in particular if - under the right circumstances - it is actually wanted to run two entities on sibling threads. Jan
On Fri, 2019-09-20 at 18:14 +0200, Jan Beulich wrote: > On 14.09.2019 10:52, Juergen Gross wrote: > > This is achieved by switching the scheduler to no longer see vcpus > > as > > the primary object to schedule, but "schedule units". Each schedule > > unit consists of as many vcpus as each core has threads on the > > current > > system. The vcpu->unit relation is fixed. > > There's another aspect here that, while perhaps obvious, I didn't > realize so far: Iirc right now schedulers try to place vCPU-s on > different cores, as long as there aren't more runnable vCPU-s than > there are cores. > Indeed they do. > This is to improve overall throughput, since > vCPU-s on sibling hyperthreads would compete for execution > resources. With a fixed relation this is going to be impossible. > It is. And that is the reason why my benchmarks show rather bad performance for a 4 vCUPUs VMs on a 8 CPUs (4 cores, with hyperthreading) host. In fact, as Juergen showed during his Xen Summit talk, in such a case core-scheduling achieves much worse performance than "regular" cpu-scheduling, both when hyperthreading is enabled and disabled. It's an intrinsic characteristic of this solution that we have decided to go for (i.e., introducing the 'virtual core' and 'scheduling resource' concepts, and act almost entirely at the schedule.c level). > Otoh I can of course see how, once we have proper virtual > topology, this allows better scheduling decisions inside the > guest, in particular if - under the right circumstances - it is > actually wanted to run two entities on sibling threads. > Yes, this is indeed one aspect. There is also the fact that, currently, as soon as you have 1 more vCPU than there are cores, e.g. coming from another VM, the guest that had each of its vCPUs running on one core, experiences a slowdown. While, with core-scheduling enabled from the beginning, performance stays consistent. In any case, this all happens with core-scheduling actually enabled. With these patches applied, but cpu-scheduling selected at boot, fully idle cores are still preferred, and the vCPUs will still be spread among them (as soon as there's any available). Regards
Hi Juergen, After an extensive testing of your jgross1/sched-v3 branch in XenRT, I'm happy to say that we've found no functional regressions so far when running in the default (thread/cpu) mode. Hopefully this gives some level of confidence to this series and the plan about including it into 4.13 [1] [1] RFC: Criteria for checking in core scheduling series https://lore.kernel.org/xen-devel/97e1bfe4-3383-ff1d-bf61-48b8aa63bb2c@citrix.com/ Thanks, Sergey
On 24.09.19 13:15, Sergey Dyasli wrote: > Hi Juergen, > > After an extensive testing of your jgross1/sched-v3 branch in XenRT, > I'm happy to say that we've found no functional regressions so far > when running in the default (thread/cpu) mode. > > Hopefully this gives some level of confidence to this series and the > plan about including it into 4.13 [1] > > [1] RFC: Criteria for checking in core scheduling series > https://lore.kernel.org/xen-devel/97e1bfe4-3383-ff1d-bf61-48b8aa63bb2c@citrix.com/ Thank you very much for your efforts and the confirmation! Juergen
On Tue, 2019-09-24 at 12:15 +0100, Sergey Dyasli wrote: > Hi Juergen, > > After an extensive testing of your jgross1/sched-v3 branch in XenRT, > I'm happy to say that we've found no functional regressions so far > when running in the default (thread/cpu) mode. > > Hopefully this gives some level of confidence to this series and the > plan about including it into 4.13 [1] > Thanks a lot for doing this, and for letting us know. Can I ask whether the tests were done using Credit2 (i.e., upstream default) or Credit1, as scheduler? Thanks again and Regards
On 24/09/2019 18:29, Dario Faggioli wrote: > On Tue, 2019-09-24 at 12:15 +0100, Sergey Dyasli wrote: >> Hi Juergen, >> >> After an extensive testing of your jgross1/sched-v3 branch in XenRT, >> I'm happy to say that we've found no functional regressions so far >> when running in the default (thread/cpu) mode. >> >> Hopefully this gives some level of confidence to this series and the >> plan about including it into 4.13 [1] >> > Thanks a lot for doing this, and for letting us know. Additionally, we've got performance test results today and they showed no noticeable regressions in thread mode against 4.13 without core-scheduling patches. > Can I ask whether the tests were done using Credit2 (i.e., upstream > default) or Credit1, as scheduler? > That was Credit1 that we use in the product. Igor