Enable Completely Fair Queuing (CFQ) as the default scheduler for Eft and beyond for Desktop Kernels only.


In Dapper and previous releases, there has been no default scheduler set at install time, thus the system defaults to the native Linux scheduler. A number of users (including this spec's author) have encountered temporary system lockups when entering Gnome(/KDE/other wm) due to the system load. Enabling CFQ as the default scheduler fixes these lockups. Other major distributions, like Red Hat, also enable CFQ by default.

In Ubuntu today, CFQ can enabled via a bootloader. In grub this is done by either appending


after the kernel parameter such as

kernel          /vmlinuz-2.6.15-25-686 root=/dev/sdb6 ro quiet splash elevator=cfq 

or by enabling it as a default in GRUB

# defoptions=ro quiet splash elevator=cfq 

(The spec author has written a How-to for this.)

Use cases

These use cases represent actual problems the spec author has troubleshooted for Ubuntu users. These are the negative cases which would be resolved by implementing this spec.

  • Bob boots his Dapper computer today and notices that the system becomes unresponsive at boot time for up to 20 seconds or more. Bob posts to the forum and searches the wiki but cannot find his answer. He forms the opinion that Ubuntu, and GNU/Linux by default, is not ready for prime time.
  • Sally purchases a new, fast, computer. She is interested in GNU/Linux and tries Dapper. She finds that when launching the window manager, the system freezes for up to 15 seconds while the UI is loading. She forms the opinion that Ubuntu, Ubuntu, and GNU/Linux by default, is not ready for prime time.
  • Tim opens up Firefox and Thunderbird on his 1.6 ghz pentium computer. His system freezes for up to 25 seconds while both programs load. He is unable to even change to the native console until this completes.
  • Joey is a computer gamer. He is playing a game in Ubuntu when his system time turns 00:01. His computer becomes unresponsive for 10 minutes while cron.daily runs.


This specification is meant for Eft and future releases. It is meant for K/E/X/Ubuntu Desktop Kernels but NOT server where deadline would be more appropriate.


This spec proposes that the CFQ scheduler be the default in the desktop kernel.

Unresolved issues

  • CLOSED: Joey Stanford Are there any other mechanisms to enable this besides passing a kernel parm?

  • David Nielsen: yes, you can patch the kernel (bad idea) or you can also do:

     echo cfq > /sys/block/hdc/queue/scheduler
    This has the advantage of being able to set a scheduler per device (maybe via a HAL policy?) so that the noop scheduler can be used for CF devices, cfq for your harddrive, etc. I would strongly favor having the system automatically set the scheduler by recommendations of something like HAL (I suspect you could make it do this - HAL is magic after all).
  • MichaelHead: I'm wondering if 'deadline' is better than 'cfq' for desktop uses. CFQ seems to be made for fairly providing disk bandwidth to a larger number of processes. This causes problems when I'm playing an audio track and an app is loading, or when I log out. I've recently noticed that when I log out in edgy, the sound is choppy and garbled... deadline attempts to provided more 'realtime' like access for apps. Here's more info on the schedulers:

BoF agenda and discussion

To be scheduled


  • Note: CFQ is the default in kernel 2.6.18
  • Add your comments here


  • Joey Stanford - 2006-07-02 12:10:47 - Added Kernel option as default per Ben Collins @ Ubuntu. Updated with HAL as per David Nielsen's comments. Fixed David's formating on his entry.


CFQbyDefault (last edited 2008-08-06 16:41:22 by localhost)