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 <sobo...@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-unsubscr...@freebsd.org"
>
_______________________________________________
freebsd-geom@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-geom
To unsubscribe, send any mail to "freebsd-geom-unsubscr...@freebsd.org"

Reply via email to