Load-balancing mirrors w/ asymmetric performance

Load-balancing mirrors w/ asymmetric performance

am 04.10.2009 21:40:37 von Chris Worley

When you mirror two devices, they may not have the same performance.
For example, if one device is local and the other remote.

There's nothing you can do about writes, as everything needs written.

But, reads shouldn't be split 50/50: they should be balanced depending
relative performance of each mirror to optimize overall read
performance.

Chris
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: Load-balancing mirrors w/ asymmetric performance

am 12.10.2009 16:22:24 von Mike Snitzer

On Sun, Oct 4, 2009 at 3:40 PM, Chris Worley wrote:
> When you mirror two devices, they may not have the same performance.
> For example, if one device is local and the other remote.
>
> There's nothing you can do about writes, as everything needs written.
>
> But, reads shouldn't be split 50/50: they should be balanced depending
> relative performance of each mirror to optimize overall read
> performance.

And MD already has the ability to flag the slow paths as write-mostly, see:

mdadm ... --write-mostly

There is also '--write-behind' support for devices that have been
tagged as 'write-mostly'.
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: Load-balancing mirrors w/ asymmetric performance

am 12.10.2009 17:00:03 von Chris Worley

On Mon, Oct 12, 2009 at 8:22 AM, Mike Snitzer wrote=
:
> On Sun, Oct 4, 2009 at 3:40 PM, Chris Worley wrot=
e:
>> When you mirror two devices, they may not have the same performance.
>> For example, if one device is local and the other remote.
>>
>> There's nothing you can do about writes, as everything needs written=

>>
>> But, reads shouldn't be split 50/50: they should be balanced dependi=
ng
>> relative performance of each mirror to optimize overall read
>> performance.
>
> And MD already has the ability to flag the slow paths as write-mostly=
, see:
>
> mdadm ... --write-mostly
>
> There is also '--write-behind' support for devices that have been
> tagged as 'write-mostly'.

Will "write-mostly" optimize the "read", such that both devices will
be accessed in proportion to their performance?

The man page says:

"...and means that the =92md=92 driver will avoid reading from these
devices if at all possible."

Even a slow device can take some of the load and increase performance.

Thanks,

Chris
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" i=
n
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: Load-balancing mirrors w/ asymmetric performance

am 13.10.2009 03:33:09 von Mike Snitzer

On Mon, Oct 12, 2009 at 11:00 AM, Chris Worley wrot=
e:
> On Mon, Oct 12, 2009 at 8:22 AM, Mike Snitzer wro=
te:
>> On Sun, Oct 4, 2009 at 3:40 PM, Chris Worley wro=
te:
>>> When you mirror two devices, they may not have the same performance=

>>> For example, if one device is local and the other remote.
>>>
>>> There's nothing you can do about writes, as everything needs writte=
n.
>>>
>>> But, reads shouldn't be split 50/50: they should be balanced depend=
ing
>>> relative performance of each mirror to optimize overall read
>>> performance.
>>
>> And MD already has the ability to flag the slow paths as write-mostl=
y, see:
>>
>> mdadm ... --write-mostly
>>
>> There is also '--write-behind' support for devices that have been
>> tagged as 'write-mostly'.
>
> Will "write-mostly" optimize the "read", such that both devices will
> be accessed in proportion to their performance?
>
> The man page says:
>
> "...and means that the =92md=92 driver will avoid reading from these
> devices if at all possible."
>
> Even a slow device can take some of the load and increase performance=


AFAIK, with current MD raid1, reads are only balanced across all
non-'write-mostly' drives. Having raid1's reads be issued proportional
to each underlying devices' performance is not currently possible.

I'd imagine that the per-bdi dirty-page accounting of each underlying
device could be used to train raid1's reads (score each raid1 member
over time) but I'm not aware of any effort toward that end.

Mike
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" i=
n
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: Load-balancing mirrors w/ asymmetric performance

am 16.10.2009 21:07:50 von Chris Worley

On Mon, Oct 12, 2009 at 7:33 PM, Mike Snitzer wrote=
:
> On Mon, Oct 12, 2009 at 11:00 AM, Chris Worley wr=
ote:
>> On Mon, Oct 12, 2009 at 8:22 AM, Mike Snitzer wr=
ote:
>>> On Sun, Oct 4, 2009 at 3:40 PM, Chris Worley wr=
ote:
>>>> When you mirror two devices, they may not have the same performanc=
e.
>>>> For example, if one device is local and the other remote.
>>>>
>>>> There's nothing you can do about writes, as everything needs writt=
en.
>>>>
>>>> But, reads shouldn't be split 50/50: they should be balanced depen=
ding
>>>> relative performance of each mirror to optimize overall read
>>>> performance.
>>>
>>> And MD already has the ability to flag the slow paths as write-most=
ly, see:
>>>
>>> mdadm ... --write-mostly
>>>
>>> There is also '--write-behind' support for devices that have been
>>> tagged as 'write-mostly'.
>>
>> Will "write-mostly" optimize the "read", such that both devices will
>> be accessed in proportion to their performance?
>>
>> The man page says:
>>
>> "...and means that the =92md=92 driver will avoid reading from these
>> devices if at all possible."
>>
>> Even a slow device can take some of the load and increase performanc=
e.
>
> AFAIK, with current MD raid1, reads are only balanced across all
> non-'write-mostly' drives. Having raid1's reads be issued proportiona=
l
> to each underlying devices' performance is not currently possible.
>
> I'd imagine that the per-bdi dirty-page accounting of each underlying
> device could be used to train raid1's reads (score each raid1 member
> over time) but I'm not aware of any effort toward that end.

Off the top of my head: the user could control this w/ a per-device
read queue depth. Set it small for the remote and large for the
local. Let the use optimize for their case.

Chris
>
> Mike
>
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" i=
n
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html