2006-01-11 13:02:03

by jeff shia

[permalink] [raw]
Subject: something about disk fragmentation

Hello,everyone

In a file system ,the disk fragmentation can slow down the data accessing
speed.How can I solve this kind of problem in a file system?I know that
preallocation tech can do this.Is there any other solutions?
Thank you!

Yours
Jeff


2006-01-11 14:33:56

by Ram Gupta

[permalink] [raw]
Subject: Re: something about disk fragmentation

2.6 kernel has 3 differen kind of io schedulers. Anticipatory io
scheduler is the default one. You may try to select CFQ or deadline
scheduler & see if that improves your performance. These schedulers
have parameters which can be tuned also.

Regards
Ram Gupta

On 1/11/06, jeff shia <[email protected]> wrote:
> Hello,everyone
>
> In a file system ,the disk fragmentation can slow down the data accessing
> speed.How can I solve this kind of problem in a file system?I know that
> preallocation tech can do this.Is there any other solutions?
> Thank you!
>
> Yours
> Jeff
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
>

2006-01-13 16:22:00

by Ram Gupta

[permalink] [raw]
Subject: Re: something about disk fragmentation

On 1/13/06, jeff shia <[email protected]> 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.

Regards
Ram Gupta

2006-01-13 19:22:55

by Jens Axboe

[permalink] [raw]
Subject: Re: something about disk fragmentation

On Fri, Jan 13 2006, Ram Gupta wrote:
> On 1/13/06, jeff shia <[email protected]> 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

2006-01-14 07:17:57

by Randy Dunlap

[permalink] [raw]
Subject: Re: something about disk fragmentation

From: Randy Dunlap <[email protected]>

Update kernel-parameters.txt IOSCHED to spell out 'anticipatory'.

Signed-off-by: Randy Dunlap <[email protected]>
---
Documentation/kernel-parameters.txt | 2 +-
1 files changed, 1 insertion(+), 1 deletion(-)

--- linux-2615-g9.orig/Documentation/kernel-parameters.txt
+++ linux-2615-g9/Documentation/kernel-parameters.txt
@@ -471,7 +471,7 @@ running once the system is up.
arch/i386/kernel/cpu/cpufreq/elanfreq.c.

elevator= [IOSCHED]
- Format: {"as" | "cfq" | "deadline" | "noop"}
+ Format: {"anticipatory" | "cfq" | "deadline" | "noop"}
See Documentation/block/as-iosched.txt and
Documentation/block/deadline-iosched.txt for details.



---

2006-01-16 08:49:48

by Jens Axboe

[permalink] [raw]
Subject: Re: something about disk fragmentation

On Fri, Jan 13 2006, Randy.Dunlap wrote:
> From: Randy Dunlap <[email protected]>
>
> Update kernel-parameters.txt IOSCHED to spell out 'anticipatory'.
>
> Signed-off-by: Randy Dunlap <[email protected]>

Thanks Randy, added.

--
Jens Axboe