* [RFC] Slow down of LTP tests aiodio_sparse.c and dio_sparse.c in kernel 6.6
@ 2024-07-19 17:43 Petr Vorel
2024-07-19 18:36 ` Jens Axboe
2024-07-22 9:00 ` Jan Kara
0 siblings, 2 replies; 8+ messages in thread
From: Petr Vorel @ 2024-07-19 17:43 UTC (permalink / raw)
To: ltp
Cc: linux-block, linux-btrfs, linux-xfs, fstests, Jens Axboe,
Jan Kara, David Sterba, Filipe Manana, Amir Goldstein,
Cyril Hrubis, Andrea Cervesato, Avinesh Kumar
Hi all,
LTP AIO DIO tests aiodio_sparse.c [1] and dio_sparse.c [2] (using [3]) slowed
down on kernel 6.6 on Btrfs and XFS, when run with default parameters. These
tests create 100 MB sparse file and write zeros (using libaio or O_DIRECT) while
16 other processes reads the buffer and check only zero is there.
Runtime of this particular setup (i.e. 100 MB file) on Btrfs and XFS on the
same system slowed down 9x (6.5: ~1 min 6.6: ~9 min). Ext4 is not affected.
(Non default parameter creates much smaller file, thus the change is not that
obvious).
Because the slowdown has been here for few kernel releases I suppose nobody
complained and the test is somehow artificial (nobody uses this in a real world).
But still it'd be good to double check the problem. I can bisect a particular
commit.
Because 2 filesystems affected, could be "Improve asynchronous iomap DIO
performance" [4] block layer change somehow related?
Kind regards,
Petr
[1] https://github.com/linux-test-project/ltp/tree/master/testcases/kernel/io/ltp-aiodio/aiodio_sparse.c
[2] https://github.com/linux-test-project/ltp/tree/master/testcases/kernel/io/ltp-aiodio/dio_sparse.c
[3] https://github.com/linux-test-project/ltp/tree/master/testcases/kernel/io/ltp-aiodio/common.h
[4] https://kernelnewbies.org/Linux_6.6#Block_layer
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [RFC] Slow down of LTP tests aiodio_sparse.c and dio_sparse.c in kernel 6.6
2024-07-19 17:43 [RFC] Slow down of LTP tests aiodio_sparse.c and dio_sparse.c in kernel 6.6 Petr Vorel
@ 2024-07-19 18:36 ` Jens Axboe
2024-07-19 20:13 ` Petr Vorel
2024-07-22 9:00 ` Jan Kara
1 sibling, 1 reply; 8+ messages in thread
From: Jens Axboe @ 2024-07-19 18:36 UTC (permalink / raw)
To: Petr Vorel, ltp
Cc: linux-block, linux-btrfs, linux-xfs, fstests, Jan Kara,
David Sterba, Filipe Manana, Amir Goldstein, Cyril Hrubis,
Andrea Cervesato, Avinesh Kumar
On 7/19/24 11:43 AM, Petr Vorel wrote:
> Hi all,
>
> LTP AIO DIO tests aiodio_sparse.c [1] and dio_sparse.c [2] (using [3]) slowed
> down on kernel 6.6 on Btrfs and XFS, when run with default parameters. These
> tests create 100 MB sparse file and write zeros (using libaio or O_DIRECT) while
> 16 other processes reads the buffer and check only zero is there.
>
> Runtime of this particular setup (i.e. 100 MB file) on Btrfs and XFS on the
> same system slowed down 9x (6.5: ~1 min 6.6: ~9 min). Ext4 is not affected.
> (Non default parameter creates much smaller file, thus the change is not that
> obvious).
>
> Because the slowdown has been here for few kernel releases I suppose nobody
> complained and the test is somehow artificial (nobody uses this in a real world).
> But still it'd be good to double check the problem. I can bisect a particular
> commit.
>
> Because 2 filesystems affected, could be "Improve asynchronous iomap DIO
> performance" [4] block layer change somehow related?
No, because that got disabled before release for unrelated reasons. Why
don't you just bisect it, since you have a simple test case?
--
Jens Axboe
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [RFC] Slow down of LTP tests aiodio_sparse.c and dio_sparse.c in kernel 6.6
2024-07-19 18:36 ` Jens Axboe
@ 2024-07-19 20:13 ` Petr Vorel
2024-07-19 20:21 ` Jens Axboe
0 siblings, 1 reply; 8+ messages in thread
From: Petr Vorel @ 2024-07-19 20:13 UTC (permalink / raw)
To: Jens Axboe
Cc: ltp, linux-block, linux-btrfs, linux-xfs, fstests, Jan Kara,
David Sterba, Filipe Manana, Amir Goldstein, Cyril Hrubis,
Andrea Cervesato, Avinesh Kumar
Hi Jens, all,
> On 7/19/24 11:43 AM, Petr Vorel wrote:
> > Hi all,
> > LTP AIO DIO tests aiodio_sparse.c [1] and dio_sparse.c [2] (using [3]) slowed
> > down on kernel 6.6 on Btrfs and XFS, when run with default parameters. These
> > tests create 100 MB sparse file and write zeros (using libaio or O_DIRECT) while
> > 16 other processes reads the buffer and check only zero is there.
> > Runtime of this particular setup (i.e. 100 MB file) on Btrfs and XFS on the
> > same system slowed down 9x (6.5: ~1 min 6.6: ~9 min). Ext4 is not affected.
> > (Non default parameter creates much smaller file, thus the change is not that
> > obvious).
> > Because the slowdown has been here for few kernel releases I suppose nobody
> > complained and the test is somehow artificial (nobody uses this in a real world).
> > But still it'd be good to double check the problem. I can bisect a particular
> > commit.
> > Because 2 filesystems affected, could be "Improve asynchronous iomap DIO
> > performance" [4] block layer change somehow related?
> No, because that got disabled before release for unrelated reasons. Why
> don't you just bisect it, since you have a simple test case?
Jens, thanks for info. Sure, I'll bisect next week and report.
The reason I reported before bisecting is because it wouldn't be the first time
the test was "artificial" and therefore reported problem was not fixed. If it's
a real problem I would expect it would be also caught by other people or even by
fstests.
Kind regards,
Petr
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [RFC] Slow down of LTP tests aiodio_sparse.c and dio_sparse.c in kernel 6.6
2024-07-19 20:13 ` Petr Vorel
@ 2024-07-19 20:21 ` Jens Axboe
0 siblings, 0 replies; 8+ messages in thread
From: Jens Axboe @ 2024-07-19 20:21 UTC (permalink / raw)
To: Petr Vorel
Cc: ltp, linux-block, linux-btrfs, linux-xfs, fstests, Jan Kara,
David Sterba, Filipe Manana, Amir Goldstein, Cyril Hrubis,
Andrea Cervesato, Avinesh Kumar
On 7/19/24 2:13 PM, Petr Vorel wrote:
> Hi Jens, all,
>
>> On 7/19/24 11:43 AM, Petr Vorel wrote:
>>> Hi all,
>
>>> LTP AIO DIO tests aiodio_sparse.c [1] and dio_sparse.c [2] (using [3]) slowed
>>> down on kernel 6.6 on Btrfs and XFS, when run with default parameters. These
>>> tests create 100 MB sparse file and write zeros (using libaio or O_DIRECT) while
>>> 16 other processes reads the buffer and check only zero is there.
>
>>> Runtime of this particular setup (i.e. 100 MB file) on Btrfs and XFS on the
>>> same system slowed down 9x (6.5: ~1 min 6.6: ~9 min). Ext4 is not affected.
>>> (Non default parameter creates much smaller file, thus the change is not that
>>> obvious).
>
>>> Because the slowdown has been here for few kernel releases I suppose nobody
>>> complained and the test is somehow artificial (nobody uses this in a real world).
>>> But still it'd be good to double check the problem. I can bisect a particular
>>> commit.
>
>>> Because 2 filesystems affected, could be "Improve asynchronous iomap DIO
>>> performance" [4] block layer change somehow related?
>
>> No, because that got disabled before release for unrelated reasons. Why
>> don't you just bisect it, since you have a simple test case?
>
> Jens, thanks for info. Sure, I'll bisect next week and report.
>
> The reason I reported before bisecting is because it wouldn't be the
> first time the test was "artificial" and therefore reported problem
> was not fixed. If it's a real problem I would expect it would be also
> caught by other people or even by fstests.
Didn't look at the test cases, so yeah may very well be bogus. But it
also may not... And a bisection may help shine some light on that too,
outside of just highlighting what commit made it slower.
--
Jens Axboe
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [RFC] Slow down of LTP tests aiodio_sparse.c and dio_sparse.c in kernel 6.6
2024-07-19 17:43 [RFC] Slow down of LTP tests aiodio_sparse.c and dio_sparse.c in kernel 6.6 Petr Vorel
2024-07-19 18:36 ` Jens Axboe
@ 2024-07-22 9:00 ` Jan Kara
2024-07-22 13:13 ` Petr Vorel
2024-07-24 13:18 ` Petr Vorel
1 sibling, 2 replies; 8+ messages in thread
From: Jan Kara @ 2024-07-22 9:00 UTC (permalink / raw)
To: Petr Vorel
Cc: ltp, linux-block, linux-btrfs, linux-xfs, fstests, Jens Axboe,
Jan Kara, David Sterba, Filipe Manana, Amir Goldstein,
Cyril Hrubis, Andrea Cervesato, Avinesh Kumar
Hi!
On Fri 19-07-24 19:43:25, Petr Vorel wrote:
> LTP AIO DIO tests aiodio_sparse.c [1] and dio_sparse.c [2] (using [3])
> slowed down on kernel 6.6 on Btrfs and XFS, when run with default
> parameters. These tests create 100 MB sparse file and write zeros (using
> libaio or O_DIRECT) while 16 other processes reads the buffer and check
> only zero is there.
So the performance of this test is irrelevant because combining buffered
reads with direct IO writes was always in "better don't do it" territory.
Definitely not if you care about perfomance.
> Runtime of this particular setup (i.e. 100 MB file) on Btrfs and XFS on the
> same system slowed down 9x (6.5: ~1 min 6.6: ~9 min). Ext4 is not affected.
> (Non default parameter creates much smaller file, thus the change is not that
> obvious).
But still it's kind of curious what caused the 9x slow down. So I'd be
curious to know the result of the bisection :). Thanks for report!
Honza
--
Jan Kara <jack@suse.com>
SUSE Labs, CR
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [RFC] Slow down of LTP tests aiodio_sparse.c and dio_sparse.c in kernel 6.6
2024-07-22 9:00 ` Jan Kara
@ 2024-07-22 13:13 ` Petr Vorel
2024-07-24 13:18 ` Petr Vorel
1 sibling, 0 replies; 8+ messages in thread
From: Petr Vorel @ 2024-07-22 13:13 UTC (permalink / raw)
To: Jan Kara
Cc: ltp, linux-block, linux-btrfs, linux-xfs, fstests, Jens Axboe,
David Sterba, Filipe Manana, Amir Goldstein, Cyril Hrubis,
Andrea Cervesato, Avinesh Kumar
Hi Jan, all,
> Hi!
> On Fri 19-07-24 19:43:25, Petr Vorel wrote:
> > LTP AIO DIO tests aiodio_sparse.c [1] and dio_sparse.c [2] (using [3])
> > slowed down on kernel 6.6 on Btrfs and XFS, when run with default
> > parameters. These tests create 100 MB sparse file and write zeros (using
> > libaio or O_DIRECT) while 16 other processes reads the buffer and check
> > only zero is there.
> So the performance of this test is irrelevant because combining buffered
> reads with direct IO writes was always in "better don't do it" territory.
> Definitely not if you care about perfomance.
Thanks a lot for having a look, Jan!
> > Runtime of this particular setup (i.e. 100 MB file) on Btrfs and XFS on the
> > same system slowed down 9x (6.5: ~1 min 6.6: ~9 min). Ext4 is not affected.
> > (Non default parameter creates much smaller file, thus the change is not that
> > obvious).
> But still it's kind of curious what caused the 9x slow down. So I'd be
> curious to know the result of the bisection :). Thanks for report!
I'm already working on it, report soon.
Kind regards,
Petr
> Honza
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [RFC] Slow down of LTP tests aiodio_sparse.c and dio_sparse.c in kernel 6.6
2024-07-22 9:00 ` Jan Kara
2024-07-22 13:13 ` Petr Vorel
@ 2024-07-24 13:18 ` Petr Vorel
2024-07-24 16:29 ` Mike Galbraith
1 sibling, 1 reply; 8+ messages in thread
From: Petr Vorel @ 2024-07-24 13:18 UTC (permalink / raw)
To: Jan Kara
Cc: ltp, linux-block, linux-btrfs, linux-xfs, fstests, Jens Axboe,
David Sterba, Filipe Manana, Amir Goldstein, Cyril Hrubis,
Andrea Cervesato, Avinesh Kumar, Peter Zijlstra, Mike Galbraith
Hi all,
[ Cc Peter and Mike ]
> Hi!
> On Fri 19-07-24 19:43:25, Petr Vorel wrote:
> > LTP AIO DIO tests aiodio_sparse.c [1] and dio_sparse.c [2] (using [3])
> > slowed down on kernel 6.6 on Btrfs and XFS, when run with default
> > parameters. These tests create 100 MB sparse file and write zeros (using
> > libaio or O_DIRECT) while 16 other processes reads the buffer and check
> > only zero is there.
> So the performance of this test is irrelevant because combining buffered
> reads with direct IO writes was always in "better don't do it" territory.
> Definitely not if you care about perfomance.
> > Runtime of this particular setup (i.e. 100 MB file) on Btrfs and XFS on the
> > same system slowed down 9x (6.5: ~1 min 6.6: ~9 min). Ext4 is not affected.
> > (Non default parameter creates much smaller file, thus the change is not that
> > obvious).
> But still it's kind of curious what caused the 9x slow down. So I'd be
> curious to know the result of the bisection :). Thanks for report!
It looks to be the slowdown was introduced by commit 63304558ba5d
("sched/eevdf: Curb wakeup-preemption") [1] from v6.6-rc1.
I also compiled current next (next-20240724), it's also slow and reverting
commit from it returns the original speed on both Btrfs and XFS.
Kind regards,
Petr
[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=63304558ba5dcaaff9e052ee43cfdcc7f9c29e85
> Honza
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [RFC] Slow down of LTP tests aiodio_sparse.c and dio_sparse.c in kernel 6.6
2024-07-24 13:18 ` Petr Vorel
@ 2024-07-24 16:29 ` Mike Galbraith
0 siblings, 0 replies; 8+ messages in thread
From: Mike Galbraith @ 2024-07-24 16:29 UTC (permalink / raw)
To: Petr Vorel, Jan Kara
Cc: ltp, linux-block, linux-btrfs, linux-xfs, fstests, Jens Axboe,
David Sterba, Filipe Manana, Amir Goldstein, Cyril Hrubis,
Andrea Cervesato, Avinesh Kumar, Peter Zijlstra
On Wed, 2024-07-24 at 15:18 +0200, Petr Vorel wrote:
> Hi all,
>
>
> [ Cc Peter and Mike ]
> > Hi!
>
> > On Fri 19-07-24 19:43:25, Petr Vorel wrote:
> > > LTP AIO DIO tests aiodio_sparse.c [1] and dio_sparse.c [2] (using [3])
> > > slowed down on kernel 6.6 on Btrfs and XFS, when run with default
> > > parameters. These tests create 100 MB sparse file and write zeros (using
> > > libaio or O_DIRECT) while 16 other processes reads the buffer and check
> > > only zero is there.
>
> > So the performance of this test is irrelevant because combining buffered
> > reads with direct IO writes was always in "better don't do it" territory.
> > Definitely not if you care about perfomance.
>
> > > Runtime of this particular setup (i.e. 100 MB file) on Btrfs and XFS on the
> > > same system slowed down 9x (6.5: ~1 min 6.6: ~9 min). Ext4 is not affected.
> > > (Non default parameter creates much smaller file, thus the change is not that
> > > obvious).
>
> > But still it's kind of curious what caused the 9x slow down. So I'd be
> > curious to know the result of the bisection :). Thanks for report!
>
> It looks to be the slowdown was introduced by commit 63304558ba5d
> ("sched/eevdf: Curb wakeup-preemption") [1] from v6.6-rc1.
That's not good, I'd rather not have over-zealous preemption back, my
box doesn't miss that one tiny bit.
Hrm... have you tried Peter's eevdf queue? The DELAY_DEQUEUE feature
therein does good things for tbench, restoring pre-eevdf throughput.
-Mike
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2024-07-24 16:29 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-19 17:43 [RFC] Slow down of LTP tests aiodio_sparse.c and dio_sparse.c in kernel 6.6 Petr Vorel
2024-07-19 18:36 ` Jens Axboe
2024-07-19 20:13 ` Petr Vorel
2024-07-19 20:21 ` Jens Axboe
2024-07-22 9:00 ` Jan Kara
2024-07-22 13:13 ` Petr Vorel
2024-07-24 13:18 ` Petr Vorel
2024-07-24 16:29 ` Mike Galbraith
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).