CFQbyDefault

Differences between revisions 1 and 2
Revision 1 as of 2006-07-02 17:28:43
Size: 3641
Editor: vc7-1-240e
Comment: page create
Revision 2 as of 2006-07-02 18:06:22
Size: 4127
Editor: 0x50c71cc7
Comment:
Deletions are marked like this. Additions are marked like this.
Line 74: Line 74:
 [wiki:DavidNielsen2]: 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).

CFQbyDefault

Summary

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

Rationale

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.

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.

Scope

This specification is meant for Eft and future releases. It is meant for K/E/X/Ubuntu including server.

Design

Enable CFQ by default either via passing args via GRUB/LILO or by setting it as default in a system config file unknown to the spec author.

Current:

joey@atf:~$ dmesg |grep sched
[17179574.304000] io scheduler noop registered
[17179574.304000] io scheduler anticipatory registered
[17179574.304000] io scheduler deadline registered
[17179574.304000] io scheduler cfq registered 
joey@atf:~$

After Spec Implementation:

joey@atf:~$ dmesg |grep sched
[17179574.304000] io scheduler noop registered
[17179574.304000] io scheduler anticipatory registered
[17179574.304000] io scheduler deadline registered
[17179574.304000] io scheduler cfq registered (default)
joey@atf:~$ 

Implementation

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

elevator=CFQ 

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 [wiki:JoeyStanford/UbuntuFAQs How-to] for this.)

This spec proposes that either this or some other internal setting unknown to the spec author be enabled as default.

Unresolved issues

  • [wiki:JoeyStanford Joey Stanford] Are there any other mechanisms to enable this besides passing a kernel parm? [wiki:DavidNielsen2]: 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).

BoF agenda and discussion

To be scheduled

Comments

Add your comments here


CategorySpec

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