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

next in thread | previous in thread | raw e-mail | index | archive | help
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?CAHEMsqatuvC1FEkRV9fWh1zqxTDJPeWk6Y5X3J9H3qpbCw=G%2BA>