Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 20 Apr 2017 02:48:45 -0700
From:      Maxim Sobolev <sobomax@freebsd.org>
To:        Steven Hartland <killing@multiplay.co.uk>
Cc:        Alexander Motin <mav@freebsd.org>, "M. Warner Losh" <imp@freebsd.org>, freebsd-geom@freebsd.org
Subject:   Re: The geom_raid(8) is not load-balancing reads across all available subdisks
Message-ID:  <CAH7qZfsRPm3On4jNh%2BU3HxNdOJymQKQiYt9QdyKiY_3AhoU02A@mail.gmail.com>
In-Reply-To: <CAHEMsqatuvC1FEkRV9fWh1zqxTDJPeWk6Y5X3J9H3qpbCw=G%2BA@mail.gmail.com>
References:  <CAH7qZfvazdFhKLmXse1PSC15wzjDq29puCh=X%2BYiwEivqL_frA@mail.gmail.com> <CAHEMsqatuvC1FEkRV9fWh1zqxTDJPeWk6Y5X3J9H3qpbCw=G%2BA@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Steven, thanks for the link but unless I missed something, that benchmark
actually talks about spinning disks (2 x HD's and 1 x SSD). My whole point
was that in the era when spinning disks are quickly approaching technical
obsolescence all those optimizations might easily turn into pessimizations
at least for some users and the share of those users is only going to get
bigger, not smaller with time.

-Max

On Tue, Apr 18, 2017 at 8:47 PM, Steven Hartland <killing@multiplay.co.uk>
wrote:

> In ZFS we look at the rotational property of the disk as well when
> calculating which device to read from, which grave a significant
> performance increase.
>
> See: https://svnweb.freebsd.org/base?view=revision&revision=256956
>
>
> On Tue, 18 Apr 2017 at 23:17, Maxim Sobolev <sobomax@freebsd.org> wrote:
>
>> Hi, I've got curious as to why running the build on my machine on top of
>> the RAID1 volume seems to prefer loading one of the drives for reading.
>> Digging into the code I found this:
>>
>>                 prio += (G_RAID_SUBDISK_S_ACTIVE - sd->sd_state) << 16;
>>                 /* If disk head is precisely in position - highly prefer
>> it. */
>>                 if (G_RAID_SUBDISK_POS(sd) == bp->bio_offset)
>>                         prio -= 2 * G_RAID_SUBDISK_LOAD_SCALE;
>>                 else
>>                 /* If disk head is close to position - prefer it. */
>>                 if (ABS(G_RAID_SUBDISK_POS(sd) - bp->bio_offset) <
>>                     G_RAID_SUBDISK_TRACK_SIZE)
>>                         prio -= 1 * G_RAID_SUBDISK_LOAD_SCALE;
>>                 if (prio < bestprio) {
>>                         best = sd;
>>                         bestprio = prio;
>>                 }
>>
>> Both my drives in RAID are SSDs, so I am wondering if this might be the
>> cause. On one hand SSDs can still have some internal buffer to cache the
>> nearby data blocks, on the other hand it's really difficult to define how
>> far that buffer might extend now and few years from now. On top of that,
>> single SATA link is likely to be bottleneck in today's systems (esp with
>> Intel XPoint) to get the data into the RAM, so perhaps ripping off this
>> optimization for good and just round robin requests between all available
>> subdsks would be a better strategy going forward?
>>
>> -Max
>> _______________________________________________
>> freebsd-geom@freebsd.org mailing list
>> https://lists.freebsd.org/mailman/listinfo/freebsd-geom
>> To unsubscribe, send any mail to "freebsd-geom-unsubscribe@freebsd.org"
>>
>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAH7qZfsRPm3On4jNh%2BU3HxNdOJymQKQiYt9QdyKiY_3AhoU02A>