The Wayback Machine - https://web.archive.org/web/20060528133239/http://kernel.jakem.net:80/
Jake Moilanen's Linux Kernel Homepage
  
Genetic Library
The genetic library patch uses a genetic algorithm to tweak the tunables of various schedulers.
As workloads change, the algorithm adjusts the tunables to optimize for performance. The patch is very useful for specific workloads that are difficult to tune.

  • Goal
  • Current Plugins
  • Future Work
  • Performance
  • Issues
  • Why in kernel
  • Config Locations
  • Patches

    Goal
    Tuning for workloads is tough, espcially when there are varying workloads. The goal of this patch is that sys-admins and users never have to explicitly tune their system, but have it done autonomically.
    Currently I have plugins for:
  • Zaphod CPU scheduler
  • Anticipatory IO scheduler
  • Deadline IO scheduler (currently broken)
  • Possible Future work:
  • Incorporate pre-defined "sets of tunables". The child's genes would be a set known good of tunable configurations, and the algorithm would just use which ever set performed the best.
  • Save optimal tunings for workloads. Recognize changing workloads and switch to optimal settings.
  • Make sure genes can be negative.
  • Investigate using on packet scheduling.
  • Investigate using on SMT scheduler.
  • Investigate using Lamarckian Evolution on discrete parameters.
  • Performance
    On FFSB there was an average improvement of 9%. On some workloads, I saw a 23% improvement. The only degradation was in sequential read, I saw a less than a 1%. Which was expected since AS is tuned for sequential read. I'll put my formal paper up soon w/ pretty graphics.

    On SpecJBB I've seen about a 1-5% gain on the Zaphod Scheduler plugin.

    On UnixBench I saw about a 2% gain for the file read/write/copy on the Anticipatory Scheduler.

    I've had no luck getting a performance improvement w/ the Deadline scheduler plugin.
    Issues
    Many times there is no IO while a child is running. The child that does not get IO is inadvertenly penalized.

    Why have it in the kernel?
  • Easier to hook
  • Low latency and not have to go inbetween user/kernel (very important for short life cycle)
  • Flexibility for the components to use the library
  • Might have inconsistent results if was application, because it would be dependent on being scheduled, but itself was in charge of modifying the scheduler. It may set the sched very wrong and never be scheduled.

  • Config locations
  • genetic-library -  "Library Routines" -> "Genetic Library"
  • genetic-as-sched - "Device Drivers" -> "Block IO" -> "Genetic Anticipatory IO Scheduler"
  • genetic-zaphod-cpu-sched - "Library Routines" -> "Genetic Library - Zaphod CPU Scheduler"
  • Patches in development

    2.6.12 Patches



    2.6.11 Patches

  • genetic-lib - Base genetic library patch
  • genetic-zaphod-cpu-sched - Zaphod CPU scheduler plugin. Depends on zaphod 6.2 patch
  • genetic-io-sched - Base plugin for IO schedulers
  • genetic-as-sched - Anticipatory scheduler plugin. Depends on genetic-io-sched.

    2.6.10 Patches

  • genetic-lib - Base genetic library patch
  • genetic-zaphod-cpu-sched - Zaphod CPU scheduler plugin. Depends on zaphod 6.2 patch
  • genetic-io-sched - Base plugin for IO schedulers
  • genetic-as-sched - Anticipatory scheduler plugin. Depends on genetic-io-sched.

    2.6.9 Patches

  • genetic-lib - Base genetic library patch
  • genetic-zaphod-cpu-sched - Zaphod CPU scheduler plugin. Depends on zaphod patch
  • genetic-io-sched - Base plugin for IO schedulers
  • genetic-as-sched - Anticipatory scheduler plugin. Depends on genetic-io-sched.
  • genetic-deadline-sched - Deadline scheduler plugin. Depends on genetic-io-sched. (currently broken)