Skip to contentSkip to conversation

FIO performance regression in 4.11 kernel vs. 4.10 kernel observed on ARM64

DISCUSSION Scott Branden 4 participants 10 messages May 6, 2017 – May 15, 2017

lore
Share & tools
lore
#0 lore raw

I have updated the kernel to 4.11 and see significant performance drops using fio-2.9.

Using FIO the performanced drops from 281 KIOPS to 207 KIOPS using single core and task.
Percent performance drop becomes even worse if multi-cores and multi- threads are used.

Platform is ARM64 based A72. Can somebody reproduce the results or know what may have changed to make such a dramatic change?

FIO command and resulting log output below using null_blk to remove as many hardware specific driver dependencies as possible.

modprobe null_blk queue_mode=2 irqmode=0 completion_nsec=0 submit_queues=1 bs=4096

taskset 0x1 fio --randrepeat=1 --ioengine=libaio --direct=1 --numjobs=1 --gtod_reduce=1 --name=readtest --filename=/dev/nullb0 --bs=4k --iodepth=128 --time_based --runtime=15 --readwrite=read

**** 281 KIOPS RESULT on 4.11 Kernel ****
readtest: (g=0): rw=read, bs=4K-4K/4K-4K/4K-4K, ioengine=libaio, iodepth=128 fio-2.9
Starting 1 process
Jobs: 1 (f=1): [R(1)] [100.0% done] [1098MB/0KB/0KB /s] [281K/0/0 iops] [eta 00m:00s]
readtest: (groupid=0, jobs=1): err= 0: pid=2868: Mon Apr 3 20:24:25 2017
read : io=16456MB, bw=1096.1MB/s, iops=280825, runt= 15001msec
cpu : usr=28.35%, sys=71.55%, ctx=1560, majf=0, minf=146
IO depths : 1=0.1%, 2=0.1%, 4=0.1%, 8=0.1%, 16=0.1%, 32=0.1%,

Quoted 1 line

=64=100.0%

      submit    : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, 
Quoted 1 line

=64=0.0%

      complete  : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, 
Quoted 1 line

=64=0.1%

      issued    : total=r=4212670/w=0/d=0, short=r=0/w=0/d=0, 
drop=r=0/w=0/d=0
      latency   : target=0, window=0, percentile=100.00%, depth=128

Run status group 0 (all jobs):

    READ: io=16456MB, aggrb=1096.1MB/s, minb=1096.1MB/s, 

maxb=1096.1MB/s, mint=15001msec, maxt=15001msec

Disk stats (read/write):
nullb0: ios=4185627/0, merge=0/0, ticks=3664/0, in_queue=3308,
util=22.05%

**** 207 KIOPS RESULT on 4.10 Kernel ****
taskset 0x1 fio --randrepeat=1 --ioengine=libaio --direct=1 --numjobs=1 --gtod_reduce=1 --name=readtest --filename=/dev/nullb0 --bs=4k --iodepth=128 --time_based --runtime=15 --readwrite=read
readtest: (g=0): rw=read, bs=4K-4K/4K-4K/4K-4K, ioengine=libaio, iodepth=128 fio-2.9
Starting 1 process
Jobs: 1 (f=1): [R(1)] [100.0% done] [807.6MB/0KB/0KB /s] [207K/0/0 iops] [eta 00m:00s]
readtest: (groupid=0, jobs=1): err= 0: pid=2832: Mon Apr 3 20:09:31 2017
read : io=12109MB, bw=826620KB/s, iops=206654, runt= 15001msec
cpu : usr=24.62%, sys=75.28%, ctx=1571, majf=0, minf=146
IO depths : 1=0.1%, 2=0.1%, 4=0.1%, 8=0.1%, 16=0.1%, 32=0.1%,

Quoted 1 line

=64=100.0%

      submit    : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, 
Quoted 1 line

=64=0.0%

      complete  : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, 
Quoted 1 line

=64=0.1%

      issued    : total=r=3100030/w=0/d=0, short=r=0/w=0/d=0, 
drop=r=0/w=0/d=0
      latency   : target=0, window=0, percentile=100.00%, depth=128

Run status group 0 (all jobs):

    READ: io=12109MB, aggrb=826619KB/s, minb=826619KB/s, 

maxb=826619KB/s, mint=15001msec, maxt=15001msec

Disk stats (read/write):
nullb0: ios=3080149/0, merge=0/0, ticks=3952/0, in_queue=3560,
util=23.73%

Regards,
Scott

#1 lore raw

Please note the 4.11 and 4.10 log results in my email were reversed - see correction below.

Performance regression is observed - FIO performance in 4.11 is much less than 4.10 on ARM64 based platform.

Quoted 14 lines · Scott Branden

I have updated the kernel to 4.11 and see significant performance drops using fio-2.9.

Using FIO the performanced drops from 281 KIOPS to 207 KIOPS using single core and task.
Percent performance drop becomes even worse if multi-cores and multi- threads are used.

Platform is ARM64 based A72. Can somebody reproduce the results or know what may have changed to make such a dramatic change?

FIO command and resulting log output below using null_blk to remove as many hardware specific driver dependencies as possible.

Quoted 8 lines

modprobe null_blk queue_mode=2 irqmode=0 completion_nsec=0 submit_queues=1 bs=4096

taskset 0x1 fio --randrepeat=1 --ioengine=libaio --direct=1 --numjobs=1 --gtod_reduce=1 --name=readtest --filename=/dev/nullb0 --bs=4k --iodepth=128 --time_based --runtime=15 --readwrite=read

**** 281 KIOPS RESULT on 4.11 Kernel ****

CORRECTION:
**** 281 KIOPS RESULT on 4.10 Kernel ****

Quoted 21 lines

readtest: (g=0): rw=read, bs=4K-4K/4K-4K/4K-4K, ioengine=libaio, iodepth=128
fio-2.9
Starting 1 process
Jobs: 1 (f=1): [R(1)] [100.0% done] [1098MB/0KB/0KB /s] [281K/0/0 iops] [eta 00m:00s]
readtest: (groupid=0, jobs=1): err= 0: pid=2868: Mon Apr 3 20:24:25 2017
read : io=16456MB, bw=1096.1MB/s, iops=280825, runt= 15001msec
cpu : usr=28.35%, sys=71.55%, ctx=1560, majf=0, minf=146
IO depths : 1=0.1%, 2=0.1%, 4=0.1%, 8=0.1%, 16=0.1%, 32=0.1%,

Quoted 1 line

=64=100.0%

     submit    : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%,
Quoted 1 line

=64=0.0%

     complete  : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%,
Quoted 1 line

=64=0.1%

     issued    : total=r=4212670/w=0/d=0, short=r=0/w=0/d=0,
drop=r=0/w=0/d=0
     latency   : target=0, window=0, percentile=100.00%, depth=128

Run status group 0 (all jobs):

   READ: io=16456MB, aggrb=1096.1MB/s, minb=1096.1MB/s, maxb=1096.1MB/s,
Quoted 8 lines

mint=15001msec, maxt=15001msec

Disk stats (read/write):
nullb0: ios=4185627/0, merge=0/0, ticks=3664/0, in_queue=3308,
util=22.05%

**** 207 KIOPS RESULT on 4.10 Kernel ****

CORRECTION:
**** 281 KIOPS RESULT on 4.11 Kernel ****

Quoted 34 lines

taskset 0x1 fio --randrepeat=1 --ioengine=libaio --direct=1 --numjobs=1 --gtod_reduce=1 --name=readtest --filename=/dev/nullb0 --bs=4k --iodepth=128 --time_based --runtime=15 --readwrite=read
readtest: (g=0): rw=read, bs=4K-4K/4K-4K/4K-4K, ioengine=libaio, iodepth=128
fio-2.9
Starting 1 process
Jobs: 1 (f=1): [R(1)] [100.0% done] [807.6MB/0KB/0KB /s] [207K/0/0 iops] [eta 00m:00s]
readtest: (groupid=0, jobs=1): err= 0: pid=2832: Mon Apr 3 20:09:31 2017
read : io=12109MB, bw=826620KB/s, iops=206654, runt= 15001msec
cpu : usr=24.62%, sys=75.28%, ctx=1571, majf=0, minf=146
IO depths : 1=0.1%, 2=0.1%, 4=0.1%, 8=0.1%, 16=0.1%, 32=0.1%,

Quoted 1 line

=64=100.0%

     submit    : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%,
Quoted 1 line

=64=0.0%

     complete  : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%,
Quoted 1 line

=64=0.1%

     issued    : total=r=3100030/w=0/d=0, short=r=0/w=0/d=0,
drop=r=0/w=0/d=0
     latency   : target=0, window=0, percentile=100.00%, depth=128

Run status group 0 (all jobs):

   READ: io=12109MB, aggrb=826619KB/s, minb=826619KB/s, maxb=826619KB/s,

mint=15001msec, maxt=15001msec

Disk stats (read/write):
nullb0: ios=3080149/0, merge=0/0, ticks=3952/0, in_queue=3560,
util=23.73%

Regards,
Scott

#2 lore raw
In reply to Scott Branden

Hi Scott,

Thanks for the report.

Quoted 14 lines · Scott Branden

I have updated the kernel to 4.11 and see significant performance drops using fio-2.9.

Using FIO the performanced drops from 281 KIOPS to 207 KIOPS using single core and task.
Percent performance drop becomes even worse if multi-cores and multi- threads are used.

Platform is ARM64 based A72. Can somebody reproduce the results or know what may have changed to make such a dramatic change?

FIO command and resulting log output below using null_blk to remove as many hardware specific driver dependencies as possible.

Quoted 6 lines

modprobe null_blk queue_mode=2 irqmode=0 completion_nsec=0 submit_queues=1 bs=4096

taskset 0x1 fio --randrepeat=1 --ioengine=libaio --direct=1 --numjobs=1 --gtod_reduce=1 --name=readtest --filename=/dev/nullb0 --bs=4k --iodepth=128 --time_based --runtime=15 --readwrite=read

I can confirm that I also see a ~20% drop in results from 4.10 to 4.11 on my AMD Seattle board w/ defconfig, but I can't see anything obvious in the log.

Things you could try:

1. Try disabling CONFIG_NUMA in the 4.11 kernel (this was enabled in defconfig between the releases).

2. Try to reproduce on an x86 box

3. Have a go at bisecting the issue, so we can revert the offender if necessary.

Cheers,

Will

#3 lore raw
Quoted 32 lines · Will Deacon

Hi Scott,

Thanks for the report.

Quoted 14 lines · Scott Branden

I have updated the kernel to 4.11 and see significant performance drops using fio-2.9.

Using FIO the performanced drops from 281 KIOPS to 207 KIOPS using single core and task.
Percent performance drop becomes even worse if multi-cores and multi- threads are used.

Platform is ARM64 based A72. Can somebody reproduce the results or know what may have changed to make such a dramatic change?

FIO command and resulting log output below using null_blk to remove as many hardware specific driver dependencies as possible.

Quoted 6 lines

modprobe null_blk queue_mode=2 irqmode=0 completion_nsec=0 submit_queues=1 bs=4096

taskset 0x1 fio --randrepeat=1 --ioengine=libaio --direct=1 --numjobs=1 --gtod_reduce=1 --name=readtest --filename=/dev/nullb0 --bs=4k --iodepth=128 --time_based --runtime=15 --readwrite=read

I can confirm that I also see a ~20% drop in results from 4.10 to 4.11 on my AMD Seattle board w/ defconfig, but I can't see anything obvious in the log.

Things you could try:

Quoted 7 lines

1. Try disabling CONFIG_NUMA in the 4.11 kernel (this was enabled in defconfig between the releases).

2. Try to reproduce on an x86 box

3. Have a go at bisecting the issue, so we can revert the offender if necessary.

One more thing to try early: As 4.11 gained support for blk-mq I/O schedulers compared to 4.10, null_blk will now also need some extra cycles for each I/O request. Try loading the driver with "queue_mode=0" or "queue_mode=1" instead of "queue_mode=2".

Arnd

#4 lore raw
Quoted 38 lines · Arnd Bergmann
Quoted 37 lines · Will Deacon

Hi Scott,

Thanks for the report.

Quoted 14 lines · Scott Branden

I have updated the kernel to 4.11 and see significant performance drops using fio-2.9.

Using FIO the performanced drops from 281 KIOPS to 207 KIOPS using single core and task.
Percent performance drop becomes even worse if multi-cores and multi- threads are used.

Platform is ARM64 based A72. Can somebody reproduce the results or know what may have changed to make such a dramatic change?

FIO command and resulting log output below using null_blk to remove as many hardware specific driver dependencies as possible.

Quoted 6 lines

modprobe null_blk queue_mode=2 irqmode=0 completion_nsec=0 submit_queues=1 bs=4096

taskset 0x1 fio --randrepeat=1 --ioengine=libaio --direct=1 --numjobs=1 --gtod_reduce=1 --name=readtest --filename=/dev/nullb0 --bs=4k --iodepth=128 --time_based --runtime=15 --readwrite=read

I can confirm that I also see a ~20% drop in results from 4.10 to 4.11 on my AMD Seattle board w/ defconfig, but I can't see anything obvious in the log.

Things you could try:

1. Try disabling CONFIG_NUMA in the 4.11 kernel (this was enabled in defconfig between the releases).

2. Try to reproduce on an x86 box

Quoted 7 lines
Quoted 2 lines

3. Have a go at bisecting the issue, so we can revert the offender if necessary.

One more thing to try early: As 4.11 gained support for blk-mq I/O schedulers compared to 4.10, null_blk will now also need some extra cycles for each I/O request. Try loading the driver with "queue_mode=0" or "queue_mode=1" instead of "queue_mode=2".

Since you have 1 submit queues set, you are being loaded with deadline attached. To compare 4.10 and 4.11, with queue_mode=2 and submit_queues=1, after loading null_blk in 4.11, do:

# echo none > /sys/block/nullb0/queue/scheduler

and re-test.

Signature · 1 line
Jens Axboe
#5 lore raw
Quoted 43 lines · Jens Axboe
Quoted 34 lines · Arnd Bergmann
Quoted 33 lines · Will Deacon
Quoted 14 lines · Scott Branden

I have updated the kernel to 4.11 and see significant performance drops using fio-2.9.

Using FIO the performanced drops from 281 KIOPS to 207 KIOPS using single core and task.
Percent performance drop becomes even worse if multi-cores and multi- threads are used.

Platform is ARM64 based A72. Can somebody reproduce the results or know what may have changed to make such a dramatic change?

FIO command and resulting log output below using null_blk to remove as many hardware specific driver dependencies as possible.

Quoted 6 lines

modprobe null_blk queue_mode=2 irqmode=0 completion_nsec=0 submit_queues=1 bs=4096

taskset 0x1 fio --randrepeat=1 --ioengine=libaio --direct=1 --numjobs=1 --gtod_reduce=1 --name=readtest --filename=/dev/nullb0 --bs=4k --iodepth=128 --time_based --runtime=15 --readwrite=read

I can confirm that I also see a ~20% drop in results from 4.10 to 4.11 on my AMD Seattle board w/ defconfig, but I can't see anything obvious in the log.

Things you could try:

1. Try disabling CONFIG_NUMA in the 4.11 kernel (this was enabled in defconfig between the releases).

2. Try to reproduce on an x86 box

Quoted 7 lines
Quoted 2 lines

3. Have a go at bisecting the issue, so we can revert the offender if necessary.

One more thing to try early: As 4.11 gained support for blk-mq I/O schedulers compared to 4.10, null_blk will now also need some extra cycles for each I/O request. Try loading the driver with "queue_mode=0" or "queue_mode=1" instead of "queue_mode=2".

Quoted 7 lines

Since you have 1 submit queues set, you are being loaded with deadline attached. To compare 4.10 and 4.11, with queue_mode=2 and submit_queues=1, after loading null_blk in 4.11, do:

# echo none > /sys/block/nullb0/queue/scheduler

and re-test.

On my setup, doing this restored a bunch of the performance, but the numbers are still ~5% worse than 4.10 (as opposed to ~20% worse with mq-deadline). Disabling NUMA as well cuts this down to ~2%.

Scott -- do you see the same sort of thing?

Will

#6 lore raw
Quoted 48 lines · Will Deacon
Quoted 47 lines · Jens Axboe
Quoted 34 lines · Arnd Bergmann
Quoted 33 lines · Will Deacon
Quoted 14 lines · Scott Branden

I have updated the kernel to 4.11 and see significant performance drops using fio-2.9.

Using FIO the performanced drops from 281 KIOPS to 207 KIOPS using single core and task.
Percent performance drop becomes even worse if multi-cores and multi- threads are used.

Platform is ARM64 based A72. Can somebody reproduce the results or know what may have changed to make such a dramatic change?

FIO command and resulting log output below using null_blk to remove as many hardware specific driver dependencies as possible.

Quoted 6 lines

modprobe null_blk queue_mode=2 irqmode=0 completion_nsec=0 submit_queues=1 bs=4096

taskset 0x1 fio --randrepeat=1 --ioengine=libaio --direct=1 --numjobs=1 --gtod_reduce=1 --name=readtest --filename=/dev/nullb0 --bs=4k --iodepth=128 --time_based --runtime=15 --readwrite=read

I can confirm that I also see a ~20% drop in results from 4.10 to 4.11 on my AMD Seattle board w/ defconfig, but I can't see anything obvious in the log.

Things you could try:

1. Try disabling CONFIG_NUMA in the 4.11 kernel (this was enabled in defconfig between the releases).

2. Try to reproduce on an x86 box

Quoted 7 lines
Quoted 2 lines

3. Have a go at bisecting the issue, so we can revert the offender if necessary.

One more thing to try early: As 4.11 gained support for blk-mq I/O schedulers compared to 4.10, null_blk will now also need some extra cycles for each I/O request. Try loading the driver with "queue_mode=0" or "queue_mode=1" instead of "queue_mode=2".

Since you have 1 submit queues set, you are being loaded with deadline attached. To compare 4.10 and 4.11, with queue_mode=2 and submit_queues=1, after loading null_blk in 4.11, do:

Quoted 7 lines
Quoted 3 lines
# echo none > /sys/block/nullb0/queue/scheduler

and re-test.

On my setup, doing this restored a bunch of the performance, but the numbers are still ~5% worse than 4.10 (as opposed to ~20% worse with mq-deadline). Disabling NUMA as well cuts this down to ~2%.

So we're down to 2%. How stable are these numbers? With mq-deadline attached, I'm not surprised there's a drop for a null_blk type of test.

Maybe a perf profile comparison between the two kernels would help?

Signature · 1 line
Jens Axboe
#7 lore raw

Hi Jens/Will,

More complex FIO test provided inline. I think there are more than one changes in 4.11 that have degraded performance.

Quoted 51 lines · Jens Axboe
Quoted 50 lines · Will Deacon
Quoted 49 lines · Jens Axboe
Quoted 34 lines · Arnd Bergmann
Quoted 33 lines · Will Deacon
Quoted 14 lines · Scott Branden

I have updated the kernel to 4.11 and see significant performance drops using fio-2.9.

Using FIO the performanced drops from 281 KIOPS to 207 KIOPS using single core and task.
Percent performance drop becomes even worse if multi-cores and multi- threads are used.

Platform is ARM64 based A72. Can somebody reproduce the results or know what may have changed to make such a dramatic change?

FIO command and resulting log output below using null_blk to remove as many hardware specific driver dependencies as possible.

Quoted 6 lines

modprobe null_blk queue_mode=2 irqmode=0 completion_nsec=0 submit_queues=1 bs=4096

taskset 0x1 fio --randrepeat=1 --ioengine=libaio --direct=1 --numjobs=1 --gtod_reduce=1 --name=readtest --filename=/dev/nullb0 --bs=4k --iodepth=128 --time_based --runtime=15 --readwrite=read

I can confirm that I also see a ~20% drop in results from 4.10 to 4.11 on my AMD Seattle board w/ defconfig, but I can't see anything obvious in the log.

Things you could try:

1. Try disabling CONFIG_NUMA in the 4.11 kernel (this was enabled in defconfig between the releases).

2. Try to reproduce on an x86 box

Quoted 7 lines
Quoted 2 lines

3. Have a go at bisecting the issue, so we can revert the offender if necessary.

One more thing to try early: As 4.11 gained support for blk-mq I/O schedulers compared to 4.10, null_blk will now also need some extra cycles for each I/O request. Try loading the driver with "queue_mode=0" or "queue_mode=1" instead of "queue_mode=2".

Since you have 1 submit queues set, you are being loaded with deadline attached. To compare 4.10 and 4.11, with queue_mode=2 and submit_queues=1, after loading null_blk in 4.11, do:

# echo none > /sys/block/nullb0/queue/scheduler
Quoted 8 lines
Quoted 5 lines
Quoted 1 line

and re-test.

On my setup, doing this restored a bunch of the performance, but the numbers are still ~5% worse than 4.10 (as opposed to ~20% worse with mq-deadline). Disabling NUMA as well cuts this down to ~2%.

So we're down to 2%. How stable are these numbers? With mq-deadline attached, I'm not surprised there's a drop for a null_blk type of test.

Could you try the following FIO test as well? This is substantially worse on 4.11 vs. 4.10. Echo none to scheduler has some benefit. But by setting queue_mode=0 it is actually slightly better in 4.11 vs. 4.10.
So Arnd's comment about blk-mq also has a negative impact?

modprobe null_blk nr_devices=4;

fio --ioengine=libaio --direct=1 --gtod_reduce=1 --name=readtest --filename=/dev/nullb0:/dev/nullb1:/dev/nullb2:/dev/nullb3 --bs=4k --iodepth=128 --time_based --runtime=10 --readwrite=randread --iodepth_low=96 --iodepth_batch=16 --numjobs=8

Quoted 3 lines

Maybe a perf profile comparison between the two kernels would help?

#8 lore raw
In reply to Jens Axboe

Hi Jens,

Details on bisecting inline.

Quoted 31 lines · Jens Axboe
Quoted 30 lines · Will Deacon
Quoted 29 lines · Jens Axboe
Quoted 28 lines · Arnd Bergmann
Quoted 27 lines · Will Deacon
Quoted 14 lines · Scott Branden

I have updated the kernel to 4.11 and see significant performance drops using fio-2.9.

Using FIO the performanced drops from 281 KIOPS to 207 KIOPS using single core and task.
Percent performance drop becomes even worse if multi-cores and multi- threads are used.

Platform is ARM64 based A72. Can somebody reproduce the results or know what may have changed to make such a dramatic change?

FIO command and resulting log output below using null_blk to remove as many hardware specific driver dependencies as possible.

Quoted 6 lines

modprobe null_blk queue_mode=2 irqmode=0 completion_nsec=0 submit_queues=1 bs=4096

taskset 0x1 fio --randrepeat=1 --ioengine=libaio --direct=1 --numjobs=1 --gtod_reduce=1 --name=readtest --filename=/dev/nullb0 --bs=4k --iodepth=128 --time_based --runtime=15 --readwrite=read

I can confirm that I also see a ~20% drop in results from 4.10 to 4.11 on my AMD Seattle board w/ defconfig, but I can't see anything obvious in the log.

Things you could try:

Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines

1. Try disabling CONFIG_NUMA in the 4.11 kernel (this was enabled in defconfig between the releases).

2. Try to reproduce on an x86 box

3. Have a go at bisecting the issue, so we can revert the offender if necessary.

The 4.11 kernel has numerous performance regressions. I only bisected up to 4.11-rc1 as merge conflicts and complexities arise after that.

First Performance regression is:
b86dd815ff74 "block: get rid of blk-mq default scheduler choice Kconfig entries"

Using "echo none > /sys/block/nullb0/queue/schedule" does not restore all performance loss at this point. I needed to revert this change to restore all loss.

Second Performance regression is:
113285b47382 "blk-mq: ensure that bd->last is always set correctly"

Third Performance regression is:
a528d35e8bfc "statx: Add a system call to make enhanced file info available"

Unfortunately due to reverting a528d35e8bfc there are merge conflicts in later 4.11-rcX versions.

I have only reported the simplest test case we have but there are other scenarios that are even worse in 4.11 that the single queue case.

Here is one:
modprobe null_blk nr_devices=4;
fio --ioengine=libaio --direct=1 --gtod_reduce=1 --name=readtest --filename=/dev/nullb0:/dev/nullb1:/dev/nullb2:/dev/nullb3 --bs=4k --iodepth=128 --time_based --runtime=10 --readwrite=randread --iodepth_low=96 --iodepth_batch=16 --numjobs=8

What is next step to fix these regressions? It is not a simple single commit causing the performance problems.

Is anyone running any performance tests on the kernel to catch such issues?

Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 4 lines

One more thing to try early: As 4.11 gained support for blk-mq I/O schedulers compared to 4.10, null_blk will now also need some extra cycles for each I/O request. Try loading the driver with "queue_mode=0" or "queue_mode=1" instead of "queue_mode=2".

Since you have 1 submit queues set, you are being loaded with deadline attached. To compare 4.10 and 4.11, with queue_mode=2 and submit_queues=1, after loading null_blk in 4.11, do:

# echo none > /sys/block/nullb0/queue/scheduler
Quoted 9 lines
Quoted 4 lines
Quoted 1 line

and re-test.

On my setup, doing this restored a bunch of the performance, but the numbers are still ~5% worse than 4.10 (as opposed to ~20% worse with mq-deadline). Disabling NUMA as well cuts this down to ~2%.

So we're down to 2%. How stable are these numbers? With mq-deadline attached, I'm not surprised there's a drop for a null_blk type of test.

Maybe a perf profile comparison between the two kernels would help?

Regards,
Scott

#9 lore raw
In reply to Will Deacon

Hi Will/Jens,

Thanks for reproducing. Comment inline

Quoted 50 lines · Will Deacon
Quoted 49 lines · Jens Axboe
Quoted 34 lines · Arnd Bergmann
Quoted 33 lines · Will Deacon
Quoted 14 lines · Scott Branden

I have updated the kernel to 4.11 and see significant performance drops using fio-2.9.

Using FIO the performanced drops from 281 KIOPS to 207 KIOPS using single core and task.
Percent performance drop becomes even worse if multi-cores and multi- threads are used.

Platform is ARM64 based A72. Can somebody reproduce the results or know what may have changed to make such a dramatic change?

FIO command and resulting log output below using null_blk to remove as many hardware specific driver dependencies as possible.

Quoted 6 lines

modprobe null_blk queue_mode=2 irqmode=0 completion_nsec=0 submit_queues=1 bs=4096

taskset 0x1 fio --randrepeat=1 --ioengine=libaio --direct=1 --numjobs=1 --gtod_reduce=1 --name=readtest --filename=/dev/nullb0 --bs=4k --iodepth=128 --time_based --runtime=15 --readwrite=read

I can confirm that I also see a ~20% drop in results from 4.10 to 4.11 on my AMD Seattle board w/ defconfig, but I can't see anything obvious in the log.

Things you could try:

1. Try disabling CONFIG_NUMA in the 4.11 kernel (this was enabled in defconfig between the releases).

2. Try to reproduce on an x86 box

Quoted 7 lines
Quoted 2 lines

3. Have a go at bisecting the issue, so we can revert the offender if necessary.

One more thing to try early: As 4.11 gained support for blk-mq I/O schedulers compared to 4.10, null_blk will now also need some extra cycles for each I/O request. Try loading the driver with "queue_mode=0" or "queue_mode=1" instead of "queue_mode=2".

Since you have 1 submit queues set, you are being loaded with deadline attached. To compare 4.10 and 4.11, with queue_mode=2 and submit_queues=1, after loading null_blk in 4.11, do:

# echo none > /sys/block/nullb0/queue/scheduler
Quoted 7 lines
Quoted 1 line

and re-test.

On my setup, doing this restored a bunch of the performance, but the numbers are still ~5% worse than 4.10 (as opposed to ~20% worse with mq-deadline). Disabling NUMA as well cuts this down to ~2%.

Scott -- do you see the same sort of thing?

NUMA was already disabled in my defconfig.

Using the echo to the scheduler restored half of my performance loss vs 4.10.
echo none > /sys/block/nullb0/queue/scheduler

I will spend some time comparing and building defconfigs.

Quoted 3 lines

Will