Re: [PATCH v3 0/5] block: loop: convert to blk-mq

From: Ming Lei
Date: Thu Jan 01 2015 - 21:22:37 EST


On Thu, Jan 1, 2015 at 11:14 PM, Sedat Dilek <sedat.dilek@xxxxxxxxx> wrote:
> On Thu, Jan 1, 2015 at 1:29 AM, Ming Lei <tom.leiming@xxxxxxxxx> wrote:
> [...]
>>> How did you test with fio (your fio lines)?
>>
>> Your fio command line is basically same with my fio config, and you
>> can attach one image to loop via: losetup -f file_name. Looks your
>> randread result is good, and I can observe ~80 IOPS vs. ~200 IOPS
>> on my slow HDD. in the randread test too.
>>
>> #################fio config##########################
>> [global]
>> direct=1
>> size=128G
>> bsrange=4k-4k
>> timeout=30
>> numjobs=1
>> ioengine=libaio
>> iodepth=64
>> filename=/dev/loop0
>> group_reporting=1
>>
>> [f]
>> rw=${RW}
>>
>
> Thanks for your fio config-file.
>
> When a 1GiB is created on my ext4-system, the IOPS raised up from 515 to 981.
>
> # egrep 'iops=|Laying out IO file' fio-test*next20141231-1-loopmq-small*
> fio-test1-3.19.0-rc2-next20141231-1-loopmq-small.txt: read :
> io=1024.0MB, bw=2063.4KB/s, iops=515 , runt=508182msec
> fio-test2-3.19.0-rc2-next20141231-1-loopmq-small.txt:randread: Laying
> out IO file(s) (1 file(s) / 1024MB)
> fio-test2-3.19.0-rc2-next20141231-1-loopmq-small.txt: read :
> io=1024.0MB, bw=3924.3KB/s, iops=981 , runt=267206msec
>
> I made some more testing with next-20141231 plus block-loop-mq-v3 and
> block.git#for-linus on top (see attached full patch).

I will submit v4 after block.git#for-linus is merged for avoiding
the conflict, and blk_mq_freeze_queue() still need to be
exported.

>
> This increases IOPS from 981 up to 2103.

Looks there isn't fancy patch for performance boost in block.git#for-linus,
I am wondering it may be caused by page cache, and before each test,
I always drop cache via 'echo 3 > /proc/sys/vm/drop_caches' for avoiding
the effect.

>
> # egrep 'iops=|Laying out IO file'
> fio-test2-3.19.0-rc2-next20141231-1-loopmq-small.txt
> fio-test2-3.19.0-rc2-next20141231-3-loopmq-small.txt
> fio-test2-3.19.0-rc2-next20141231-1-loopmq-small.txt:randread: Laying
> out IO file(s) (1 file(s) / 1024MB)
> fio-test2-3.19.0-rc2-next20141231-1-loopmq-small.txt: read :
> io=1024.0MB, bw=3924.3KB/s, iops=981 , runt=267206msec
> fio-test2-3.19.0-rc2-next20141231-3-loopmq-small.txt:randread: Laying
> out IO file(s) (1 file(s) / 1024MB)
> fio-test2-3.19.0-rc2-next20141231-3-loopmq-small.txt: read :
> io=1024.0MB, bw=8414.9KB/s, iops=2103 , runt=124611msec
>
> If you like you can have a closer look at the fio benchmark results,

Anyway both us can observe big improvement on randread about
the patch.

> I also have added two patches which made it easy for me to cope with
> the merge conflicts within block/loop stuff.

Thanks for your report on this conflict.

Thanks,
Ming Lei
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/