Re: [PATCH V3] Btrfs: enchanse raid1/10 balance heuristic

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, 31 Dec 2017 00:29:11 +0300
Dmitrii Tcvetkov <demfloro@xxxxxxxxxxx> wrote:

> On Sat, 30 Dec 2017 23:32:04 +0300
> Timofey Titovets <nefelim4ag@xxxxxxxxx> wrote:
> 
> > Currently btrfs raid1/10 balancer balance requests to mirrors,
> > based on pid % num of mirrors.
> > 
> > Make logic understood:
> >  - if one of underline devices are non rotational
> >  - Queue leght to underline devices
> > 
> > By default try use pid % num_mirrors guessing, but:
> >  - If one of mirrors are non rotational, repick optimal to it
> >  - If underline mirror have less queue leght then optimal,
> >    repick to that mirror
> > 
> > For avoid round-robin request balancing,
> > lets round down queue leght:
> >  - By 8 for rotational devs
> >  - By 2 for all non rotational devs
> > 
> > Changes:
> >   v1 -> v2:
> >     - Use helper part_in_flight() from genhd.c
> >       to get queue lenght
> >     - Move guess code to guess_optimal()
> >     - Change balancer logic, try use pid % mirror by default
> >       Make balancing on spinning rust if one of underline devices
> >       are overloaded
> >   v2 -> v3:
> >     - Fix arg for RAID10 - use sub_stripes, instead of num_stripes
> > 
> > Signed-off-by: Timofey Titovets <nefelim4ag@xxxxxxxxx>  
> 
> Reviewed-by: Dmitrii Tcvetkov <demfloro@xxxxxxxxxxx>
> 
Tested-by: Dmitrii Tcvetkov <demfloro@xxxxxxxxxxx>

Benchmark summary (arithmetic mean of 3 runs):
		Mainline		Patch
--------------------------------------------------------------
RAID1	|	18.9 MiB/s	|	26.5 MiB/s
RAID10	|	30.7 MiB/s	|	30.7 MiB/s


fio configuration:
[global]                                                                                                                                                                   
ioengine=libaio
buffered=0
direct=1
bssplit=32k/100
size=8G
directory=/mnt/
iodepth=16
time_based
runtime=900

[test-fio]
rw=randread

All tests were run on 4 HDD btrfs filesystem in a VM with 4 Gb
of ram on idle host. Full results attached to the email.

Attachment: results.tar.gz
Description: application/gzip


[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux