On 2019-05-13 19:52, David Sterba wrote:
I'd rather see a generic mechanism that would spread the load than
doing
static checks if the device is or is not rotational. Though this is a
significant factor, it's not 100% reliable, eg. NBD or iscsi or other
layers between the physical device and what the fs sees.
Is there perhaps a way to measure, or access existing statistics for,
average read times for each device, and use that to hint at suggested
devices to read from?
Regarding the patches to select mirror policy, that Anand sent, I think
we first should provide a sane default policy that addresses most
commong workloads before we offer an interface for users that see the
need to fiddle with it.
Is it necessary to let users choose a (read) mirror policy if the
options follow a logical progression? For now we could say:
choose_mirror():
read_mirrors = list_available_read_mirrors() (Anand's patch series)
if read_mirrors.length == 1 //User specified only one device to read
from
return read_mirrors[0]
if read_mirrors is empty
read_mirrors = all_available_mirrors()
return fastest_mirror_from(read_mirrors) (Timofey's patch)
Any other algorithms can be added into the stack in a logical position.
Perhaps if it gets more complicated then there can be an fs
property/mount option/tunable to disable one or more algorithms.
--
Steven Davies