2001-12-18 01:09:19

by Ingo Molnar

[permalink] [raw]
Subject: [patch] raid-2.5.1-I7


the attached patch (against 2.5.1-final) includes the next round of RAID-1
improvements. First it completes the raid1.c cleanups i planned, and it
also adds a number of new RAID-1 performance features.

Changelog:

- cleaned up the resync engine. It got much simpler and easier to
maintain, while still saturating the disks. Resync doesnt get stuck
under heavy load anymore. (this code can be switched to use explicit IO
barrier requests in the future.)

- rewrote the read balancing code to use three estimators: a per-array
'next expected sequential IO' position, plus an IRQ-driven 'estimated
disk head' position. The head position is now updated from all the IO
completion routines: end of READ, end of WRITE, end of resync-READ, end
of resync-WRITE. I've added per-disk tracking of pending requests,
and the read balancer now detects idle disks and utilizes them before
trying to read-balance between busy disks. I've also removed the
sector_count limit that artificially switched the current disk. These
changes make read balancing more accurate and more effective.

- the old raid1 code used to have a limitation: it has always read from
the first disk until the resync finished. Now the code will
read-balance READ requests up to the resync boundary. This should
further improve performance during resyncs.

- added the 'idle IO resync' feature which we used to have in the 2.2
patches, but via a different implementation that does not touch the
generic block IO code. Resync happens only when there is no normal IO
pending on the array. This feature should make resync a more seemless
operation. Resync behavior can be tuned via the speed_limit_min and
speed_limit_max sysctl tunables. Default for the minimum resync speed
is 500 KB/sec, the maximum is 200 MB/sec.

- fixed a number of sector_t <=> unsigned long bugs still left.

despite these new features added, the patch makes raid1.c 8% smaller, so
it's a win-win situation :-) I've tested the patch on UP and SMP as well,
and it's working just fine for me both in degraded-mode and normal mode,
but the usual warnings (do not use on production system, etc.) apply.

Comments, reports, suggestions welcome,

Ingo


Attachments:
raid-2.5.1-I7.gz (8.62 kB)

2001-12-18 06:41:53

by Fabio Massimo Di Nitto

[permalink] [raw]
Subject: Re: [patch] raid-2.5.1-I7

Ingo Molnar wrote:

> the attached patch (against 2.5.1-final) includes the next round of RAID-1
> improvements. First it completes the raid1.c cleanups i planned, and it
> also adds a number of new RAID-1 performance features.
>
>
> Comments, reports, suggestions welcome,
>
> Ingo
>

Hi Ingo,
a simple question. Do You have any plan to port this
performance improvments in 2.4??

Thanks
Fabio

--
Debian GNU/Linux Unstable Kernel 2.4.15aa1
fabbione on irc.atdot.it #coredump #kchat | [email protected]

2001-12-18 13:08:46

by Roy Sigurd Karlsbakk

[permalink] [raw]
Subject: Re: [patch] raid-2.5.1-I7

Does this have anything to do with the bug I've reported about 2.4.x
slowing down i/o after heavy sequencial read-only from >=50 files
concurrently? (see BUG raid subsys)

roy

On Mon, 17 Dec 2001, Ingo Molnar wrote:

>
> the attached patch (against 2.5.1-final) includes the next round of RAID-1
> improvements. First it completes the raid1.c cleanups i planned, and it
> also adds a number of new RAID-1 performance features.
>
> Changelog:
>
> - cleaned up the resync engine. It got much simpler and easier to
> maintain, while still saturating the disks. Resync doesnt get stuck
> under heavy load anymore. (this code can be switched to use explicit IO
> barrier requests in the future.)
>
> - rewrote the read balancing code to use three estimators: a per-array
> 'next expected sequential IO' position, plus an IRQ-driven 'estimated
> disk head' position. The head position is now updated from all the IO
> completion routines: end of READ, end of WRITE, end of resync-READ, end
> of resync-WRITE. I've added per-disk tracking of pending requests,
> and the read balancer now detects idle disks and utilizes them before
> trying to read-balance between busy disks. I've also removed the
> sector_count limit that artificially switched the current disk. These
> changes make read balancing more accurate and more effective.
>
> - the old raid1 code used to have a limitation: it has always read from
> the first disk until the resync finished. Now the code will
> read-balance READ requests up to the resync boundary. This should
> further improve performance during resyncs.
>
> - added the 'idle IO resync' feature which we used to have in the 2.2
> patches, but via a different implementation that does not touch the
> generic block IO code. Resync happens only when there is no normal IO
> pending on the array. This feature should make resync a more seemless
> operation. Resync behavior can be tuned via the speed_limit_min and
> speed_limit_max sysctl tunables. Default for the minimum resync speed
> is 500 KB/sec, the maximum is 200 MB/sec.
>
> - fixed a number of sector_t <=> unsigned long bugs still left.
>
> despite these new features added, the patch makes raid1.c 8% smaller, so
> it's a win-win situation :-) I've tested the patch on UP and SMP as well,
> and it's working just fine for me both in degraded-mode and normal mode,
> but the usual warnings (do not use on production system, etc.) apply.
>
> Comments, reports, suggestions welcome,
>
> Ingo
>

--
Roy Sigurd Karlsbakk, MCSE, MCNE, CLS, LCA

Computers are like air conditioners.
They stop working when you open Windows.

2001-12-18 15:15:55

by Ingo Molnar

[permalink] [raw]
Subject: Re: [patch] raid-2.5.1-I7


On Tue, 18 Dec 2001, Roy Sigurd Karlsbakk wrote:

> Does this have anything to do with the bug I've reported about 2.4.x
> slowing down i/o after heavy sequencial read-only from >=50 files
> concurrently? (see BUG raid subsys)

no. You have a RAID-0 array, while the patch i sent only affects RAID-1.
It's very likely that 50 concurrent reads wont perform well on any device
(RAID or standalone disk), i hope we can tackle workloads like that later
in 2.5.

Ingo

2001-12-18 15:32:25

by Roy Sigurd Karlsbakk

[permalink] [raw]
Subject: Re: [patch] raid-2.5.1-I7

> > Does this have anything to do with the bug I've reported about 2.4.x
> > slowing down i/o after heavy sequencial read-only from >=50 files
> > concurrently? (see BUG raid subsys)
>
> no. You have a RAID-0 array, while the patch i sent only affects RAID-1.
> It's very likely that 50 concurrent reads wont perform well on any device
> (RAID or standalone disk), i hope we can tackle workloads like that later
> in 2.5.

It really DOES perform well ... that is ... until it's used all the memory
and stops reading fast.


--
Roy Sigurd Karlsbakk, MCSE, MCNE, CLS, LCA

Computers are like air conditioners.
They stop working when you open Windows.

2001-12-19 13:12:19

by Ingo Molnar

[permalink] [raw]
Subject: [patch] raid-2.5.1-I8


the -I7 RAID patch did not apply to 2.5.1 cleanly - the attached -I8
version does.

Ingo

-I7's Changelog:

- cleaned up the resync engine. It got much simpler and easier to
maintain, while still saturating the disks. Resync doesnt get stuck
under heavy load anymore. (this code can be switched to use explicit IO
barrier requests in the future.)

- rewrote the read balancing code to use three estimators: a per-array
'next expected sequential IO' position, plus an IRQ-driven 'estimated
disk head' position. The head position is now updated from all the IO
completion routines: end of READ, end of WRITE, end of resync-READ, end
of resync-WRITE. I've added per-disk tracking of pending requests,
and the read balancer now detects idle disks and utilizes them before
trying to read-balance between busy disks. I've also removed the
sector_count limit that artificially switched the current disk. These
changes make read balancing more accurate and more effective.

- the old raid1 code used to have a limitation: it has always read from
the first disk until the resync finished. Now the code will
read-balance READ requests up to the resync boundary. This should
further improve performance during resyncs.

- added the 'idle IO resync' feature which we used to have in the 2.2
patches, but via a different implementation that does not touch the
generic block IO code. Resync happens only when there is no normal IO
pending on the array. This feature should make resync a more seemless
operation. Resync behavior can be tuned via the speed_limit_min and
speed_limit_max sysctl tunables. Default for the minimum resync speed
is 500 KB/sec, the maximum is 200 MB/sec.

- fixed a number of sector_t <=> unsigned long bugs still left.


Attachments:
raid-2.5.1-I8 (5.54 kB)

2001-12-19 13:20:40

by Ingo Molnar

[permalink] [raw]
Subject: [patch] raid-2.5.1-I9


-I9: patch mixup again, this one actually does include the intended
changes. Brown paperbag time ...

Ingo


Attachments:
raid-2.5.1-I9.gz (8.39 kB)