Credit2 Scheduler

From Xen
Revision as of 18:00, 9 November 2011 by 62.200.22.2 (talk) (Migrated)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search


This page is meant as a catch-all for information relating to credit2 scheduler development. I will try to keep it updated as development happens. Please consult the mailing list for more recent discussions.

Status Updates

  • 2010 December: credit2 integrated into the automated test suite. This should make sure it remains reliable and turn up any heisenbugs.
  • 2010 24 December: Simple load balancer checked into xen-unstable; credit2 can now handle multiple sockets.
  • 2010 14 April: Credit2 checked into xen-unstable!

Current state

  • Reliability
    • Integrated into the regular test suite; seems to be very stable
  • Fairness algorithm
    • "Weight" implemented; "Cap" and "Reservation" not implemented.
    • More fair to latency-sensitive VMs than credit2.
    • Not optimized well; probably more computational overhead than credit1
    • Not tested extensively with other combinations of workloads
  • Load-balancing algorithm
    • Prototype working, tested on 2-socket box
    • Not optimized well; probably more computational overhead than credit1
    • Not tested extensively with many combinations of workloads
    • No accounting for hyperthreading

To-do

  • Development: CPU topology
    • Load balancing algorithm: There's a fairly simple load-balancing algorithm in place, but it could use some work.
    • Hyperthreading: Need to try to avoid sharing threads if possible, and to "discount" sharing of threads
  • Development: Credit algorithm
    • Mixed work problem: The current patch will work well if a VM is only doing audio. But what if someone is listening to iTunes and there's a flash ad in the background burning 100% of the CPU? Can we allow the audio to play well while still giving the VM only its fair share?
    • Cap and Reservation: With the current algorithm, how do we implement the "cap" and "reservation" features?
  • Development: Honing
    • Credit math optimization: The current patch was made to be correct, not necessarily the most efficient. Every credit update involves a division, which may be slow. Some profiling and optimization would be useful here. Probably best to wait on this until the cap and reservation system is working, because the algorithm may change somewhat.
  • Testing
    • Automated audio / video measurement: My current method of measuring audio quality is to play some music and count the number of "skips" I hear over five minutes. It would be great if this could be done programmatically somehow.
    • More workloads, more configurations: Test your favorite workload, and see if there are any regressions, improvements, and so on. Remember that a scheduler's job is only hard when there's more work to do than there is CPU to do it, so make sure you're focusing on multiple competing workloads.
    • Test framework design: I would like to have a standardized set of regression tests that can be run as we develop the scheduler, to see (a) when we've gotten where we want to be, and (b) so in the future, if anyone proposes a change, we can test the change for any regressions in other workloads.

References

  • XenSummit Asia 2009: Whitepaper Slides
    • The whitepaper contains a brief summary of the design target, goals, interface, credit design, and load balancing design.