From: DanglingPointer <danglingpointerexception@gmail.com>
To: Qu Wenruo <quwenruo.btrfs@gmx.com>, linux-btrfs@vger.kernel.org
Cc: danglingpointerexception@gmail.com
Subject: Re: Enhancement Idea - Optional PGO+LTO build for btrfs-progs
Date: Wed, 14 Jul 2021 17:34:01 +1000 [thread overview]
Message-ID: <db80b801-9e7d-ce2b-15dd-84b30faf19cd@gmail.com> (raw)
In-Reply-To: <f68a2809-eb46-744f-7045-93eaeb4bb44f@gmx.com>
"Why would you think btrfs-progs is the one needs to optimization?"
Perhaps I should have written more context. When the data migration was
taking a very long time (days); and the pauses due to "btrfs-transacti"
blocking all IO including nfsd. We thought, "should we '$ btrfs scrub
<mount>' to make sure nothing had gone wrong?"
Problem is, scrubbing on the whole RAID5 takes ages! If we did one disk
of the array only it would at least sample a quarter of the array with a
quarter chance of detecting if something/anything had gone wrong and
hopefully won't massively slow down the on-going migration.
We tried it for a while on the single drive and it did indeed have 2x
the scrubbing throughput but it was still very slow since we're talking
multi-terrabytes on the single disk! I believe the ETA forecast was ~3
days.
Interestingly scrubbing the whole lot (whole RAID5 array) in one go by
just scrubbing the mount point is a 4day ETA which we do regularly every
3 months. So even though it is slower on each disk, it finishes the
whole lot faster than doing one disk at a time sequentially.
Anyways, thanks for informing us on what btrfs-progs does and how 'scrub
speed' is independent of btrfs-progs and done by the kernel ioctls (on
the other email thread).
regards,
DP
I thought btrfs scrub was part of btrfs-progs. Pardon my ignorance if
it isn't.
On 14/7/21 3:00 pm, Qu Wenruo wrote:
>
>
> On 2021/7/14 上午10:51, DanglingPointer wrote:
>> Recently we have been impacted by some performance issues with the
>> workstations in my lab with large multi-terabyte arrays in btrfs. I
>> have detailed this on a separate thread. It got me thinking however,
>> why not have an optional configure option for btrfs-progs to use PGO
>> against the entire suite of regression tests?
>>
>> Idea is:
>>
>> 1. configure with optional "-pgo" or "-fdo" option which will configure
>> a relative path from source root where instrumentation files will go
>> (let's start with gcc only for now, so *.gcda files into a folder).
>> We then add the instrumentation compiler option
>> 2. build btrfs-progs
>> 3. run every single tests available ( make test && make test-fsck &&
>> make test-convert)
>> 4. clean-up except for instrumentation files
>> 5. re-build without the instrumentation flag from point 1; and use the
>> instrumentation files for feedback directed optimisation (FDO) (for
>> gcc add additional partial-training flag); add LTO.
>
> Why would you think btrfs-progs is the one needs to optimization?
>
> From your original report, there is nothing btrfs-progs related at all.
>
> All your work, from scrub to IO, it's all handled by kernel btrfs module.
>
> Thus optimization of btrfs-progs would bring no impact.
>
> Thanks,
> Qu
>>
>> I know btrfs is primarily IO bound and not cpu. But just thinking of
>> squeezing every last efficiency out of whatever is running in the cpu,
>> cache and memory.
>>
>> I suppose people can do the above on their own, but was thinking if it
>> was provided as a configuration optional option then it would make it
>> easier for people to do without more hacking. Just need to add warnings
>> that it will take a long time, have a coffee.
>>
>> The python3 configure process has the process above as an optional
>> option but caters for gcc and clang (might even cater for icc).
>>
>> Anyways, that's my idea for an enhancement above.
>>
>> Would like to know your thoughts. cheers...
>>
next prev parent reply other threads:[~2021-07-14 7:34 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-14 2:51 Enhancement Idea - Optional PGO+LTO build for btrfs-progs DanglingPointer
2021-07-14 5:00 ` Qu Wenruo
2021-07-14 7:34 ` DanglingPointer [this message]
2021-07-14 7:57 ` Qu Wenruo
2021-07-14 9:19 ` DanglingPointer
2021-07-14 12:35 ` Neal Gompa
2021-07-14 13:01 ` Qu Wenruo
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=db80b801-9e7d-ce2b-15dd-84b30faf19cd@gmail.com \
--to=danglingpointerexception@gmail.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=quwenruo.btrfs@gmx.com \
/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