From: "Song, Xiongwei" <Xiongwei.Song@windriver.com>
To: "phillip@squashfs.org.uk" <phillip@squashfs.org.uk>,
"willy@infradead.org" <willy@infradead.org>
Cc: "linux-mm@kvack.org" <linux-mm@kvack.org>,
"squashfs-devel@lists.sourceforge.net"
<squashfs-devel@lists.sourceforge.net>
Subject: squashfs performance regression and readahea
Date: Sun, 8 May 2022 14:46:40 +0000 [thread overview]
Message-ID: <PH0PR11MB519282C2834C7BB7B5431F34ECC79@PH0PR11MB5192.namprd11.prod.outlook.com> (raw)
Hello,
I am facing a performance regression on squashfs. There are many squashfs
partitions on our board. I am doing the operations below on 90 squashfs
partitions:
"for cnt in $(seq 0 9); do echo 3 > /proc/sys/vm/drop_caches; echo "Loop ${cnt}:"; time -v find /squashfs/part[0-9][0-9] | xargs -P 24 -i cat {} > /dev/null 2>/dev/null; echo ""; done"
On linux 4.18, I got the elapsed time statistics below with command above(run
find/xargs/cat commands 10 times):
1:22.80 (1m + 22.80s)
0:59.76
1:01.43
1:02.48
1:03.03
1:02.92
1:03.19
1:03.22
1:03.26
1:03.14
On linux 5.10, huge performance regression:
5:48.69 (5m + 48.69s)
5:52.99
6:06.30
6:01.43
5:50.08
6:26.59
6:09.98
6:04.72
6:05.21
6:21.49
By "git bisect", I found this regression is related to readahead. After reverting
c1f6925e1091 ("mm: put readahead pages in cache earlier") and
8151b4c8bee4 ("mm: add readahead address space operation") on linux 5.10,
the performance is improved:
1:37.16 (1m + 37.16s)
1:04.18
1:05.28
1:06.07
1:06.31
1:06.58
1:06.80
1:06.79
1:06.95
1:06.61
Also, I found disabling readahead is helpful with 9eec1d897139 ("squashfs: provide
backing_dev_info in order to disable read-ahead"):
1:06.18 (1m + 6.18s)
1:05.65
1:06.34
1:06.88
1:06.52
1:06.78
1:06.61
1:06.99
1:06.60
1:06.79
I have also tired with the upstream linux 5.18, see the results below:
1:12.82 (1m + 12.82s)
1:07.68
1:08.94
1:09.65
1:09.87
1:10.32
1:10.47
1:10.34
1:10.24
1:10.34
As we can see that even if the readahead disabled, there is still extra 2 ~ 3s overhead
than linux 4.18. BTW, the reverted two commits above are from " Change readahead API "
series, see the following link:
https://lore.kernel.org/all/20200414150233.24495-11-willy@infradead.org/T/#m22d6de881c24057b776758ae8e7f5d54e2db8026
.
I would appreciate your comments and inputs.
Regards,
Xiognwei
next reply other threads:[~2022-05-08 14:47 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-08 14:46 Song, Xiongwei [this message]
2022-05-08 16:44 ` Matthew Wilcox
2022-05-09 7:05 ` Hsin-Yi Wang
2022-05-09 7:10 ` Hsin-Yi Wang
2022-05-09 9:42 ` Song, Xiongwei
2022-05-09 12:43 ` Xiongwei Song
2022-05-09 13:21 ` Matthew Wilcox
2022-05-09 14:29 ` Hsin-Yi Wang
2022-05-10 12:30 ` Xiongwei Song
2022-05-10 12:47 ` Hsin-Yi Wang
2022-05-10 13:18 ` Xiongwei Song
2022-05-11 15:12 ` Hsin-Yi Wang
2022-05-11 19:13 ` Phillip Lougher
2022-05-12 6:23 ` Hsin-Yi Wang
2022-05-13 5:33 ` Phillip Lougher
2022-05-13 6:35 ` Hsin-Yi Wang
2022-05-15 0:54 ` Phillip Lougher
2022-05-16 8:23 ` Hsin-Yi Wang
2022-05-16 9:00 ` Xiongwei Song
2022-05-16 9:10 ` Hsin-Yi Wang
2022-05-16 9:34 ` Xiongwei Song
2022-05-16 11:01 ` Hsin-Yi Wang
2022-05-13 13:09 ` Matthew Wilcox
2022-05-15 0:05 ` Phillip Lougher
2022-05-13 12:16 ` Xiongwei Song
2022-05-13 12:29 ` Xiongwei Song
2022-05-13 16:43 ` Hsin-Yi Wang
2022-05-13 18:12 ` Matthew Wilcox
2022-05-13 23:12 ` Xiongwei Song
2022-05-14 11:51 ` Hsin-Yi Wang
2022-05-10 1:11 ` Phillip Lougher
2022-05-10 2:35 ` Matthew Wilcox
2022-05-10 3:20 ` Phillip Lougher
2022-05-10 3:41 ` Phillip Lougher
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=PH0PR11MB519282C2834C7BB7B5431F34ECC79@PH0PR11MB5192.namprd11.prod.outlook.com \
--to=xiongwei.song@windriver.com \
--cc=linux-mm@kvack.org \
--cc=phillip@squashfs.org.uk \
--cc=squashfs-devel@lists.sourceforge.net \
--cc=willy@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox