Re: something about disk fragmentation

From: Jens Axboe
Date: Fri Jan 13 2006 - 14:21:32 EST


On Fri, Jan 13 2006, Ram Gupta wrote:
> On 1/13/06, jeff shia <tshxiayu@xxxxxxxxx> wrote:
> > Where Can I get the io schedulers?
> > Thank you!
>
> See the documentation under the kernel source tree. The code is
> already there. You need only to select by passing correct kernel
> parameters.
> elevator= [IOSCHED]
> Format: {"as" | "cfq" | "deadline" | "noop"}
> See Documentation/block/as-iosched.txt and
> Documentation/block/deadline-iosched.txt for details.

It's much more convenient to do it dynamically (and saves you a reboot).
Just do

# echo deadline > /sys/block/dev/queue/scheduler

to switch it at runtime, replace 'dev' with your hard drive name, eg
hda or sda etc.

BTW, that option needs updating, you are supposed to use "anticipatory"
for that scheduler (patch accepted :-).

--
Jens Axboe

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/