[nSLUG] performance and schedulers

Bill Davidson bdavidso at supercity.ns.ca
Wed Jun 22 11:27:00 ADT 2005


Hi:

On Wed, 2005-22-06 at 09:12 -0300, Donald Teed wrote:

> 2. Everyone has been getting 2.6 kernels with all of the IO Schedulers
> built into the kernel.  You just have not been able to deselect them
> or see the schedulers from the menuconfig option to the kernel's make
> (until 2.6.12 or thereabouts).  The only way you can actually use
> a scheduler other than the default anticipatory one is to set 
> the elevator= kernel option in your lilo or grub config.

I'm not sure you are right there, or at least your kernel version is a
bit off.  I think at least some of the change came in 2.6.10, when the
schedulers were made modular -- that is, you can compile them as
loadable modules.  

Finding out which one you are currently using is done via the sysfs
filesystem:

bdavidso at plato2:~$ cat /sys/block/hda/queue/scheduler
noop [anticipatory] deadline cfq

Note that "anticipatory" has "[]" around it, indicating that it is
active for that device.  You can change it thus (from the 2.6.10
Changelog):

Changing is done with
	
	router:/sys/block/hda/queue # echo deadline > scheduler
	router:/sys/block/hda/queue # cat scheduler
	cfq [deadline] anticipatory
	
	deadline is now the new active io scheduler for hda.

This really ought to be documented better somewhere -- searching through
a 1.5M text file is no fun.

Kinda cool though, eh?  You can have different schedulers for different
devices.  I assume this would only apply to low-level IDE devices, and
not to md devices.  What do you see under /sys/block/<device>/queue on
your RAID system?

You can also do quite a bit of tuning of the schedulers through the
sysfs interface -- this at least is documented in the kernel
documentation.

-- 
Bill Davidson
bdavidso at supercity.ns.ca


!DSPAM:42b9753358091742082415!




More information about the nSLUG mailing list