From: "Darrick J. Wong" <darrick.wong@oracle.com>
To: Eric Sandeen <sandeen@sandeen.net>
Cc: sandeen@redhat.com, linux-xfs@vger.kernel.org
Subject: Re: [PATCH 4/8] xfs_scrub: use datadev parallelization estimates for thread count
Date: Mon, 4 Feb 2019 10:34:49 -0800 [thread overview]
Message-ID: <20190204183449.GZ5761@magnolia> (raw)
In-Reply-To: <be364989-b8de-b027-8561-48f7bc53a7fa@sandeen.net>
On Mon, Feb 04, 2019 at 12:31:59PM -0600, Eric Sandeen wrote:
> On 12/19/18 1:29 PM, Darrick J. Wong wrote:
> > From: Darrick J. Wong <darrick.wong@oracle.com>
> >
> > During phases 2-5, xfs_scrub should estimate the level of
> > parallelization possible on the data device to determine the number of
> > threads spawned to scrub filesystem metadata, not just blindly using the
> > number of CPUs. This avoids flooding non-rotational storage with random
> > reads, which totally destroys performance and makes scrub runtimes
> > higher.
>
> typo in the changelog? __disk_heads() /does/ throw all cpus at nonrotational,
> should the above presumably say "rotational storage?"
Er... yes. Would you mind changing that on its way in, pretty please?
:)
--D
> Otherwise,
>
> Reviewed-by: Eric Sandeen <sandeen@redhat.com>
>
> >
> > Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
> > ---
> > scrub/phase1.c | 14 +++++++-------
> > 1 file changed, 7 insertions(+), 7 deletions(-)
> >
> >
> > diff --git a/scrub/phase1.c b/scrub/phase1.c
> > index 2113014b..6b472147 100644
> > --- a/scrub/phase1.c
> > +++ b/scrub/phase1.c
> > @@ -109,13 +109,6 @@ _("Must be root to run scrub."));
> > return false;
> > }
> >
> > - ctx->nr_io_threads = nproc;
> > - if (verbose) {
> > - fprintf(stdout, _("%s: using %d threads to scrub.\n"),
> > - ctx->mntpoint, scrub_nproc(ctx));
> > - fflush(stdout);
> > - }
> > -
> > if (!platform_test_xfs_fd(ctx->mnt_fd)) {
> > str_info(ctx, ctx->mntpoint,
> > _("Does not appear to be an XFS filesystem!"));
> > @@ -193,6 +186,13 @@ _("Unable to find realtime device path."));
> > return false;
> > }
> >
> > + ctx->nr_io_threads = disk_heads(ctx->datadev);
> > + if (verbose) {
> > + fprintf(stdout, _("%s: using %d threads to scrub.\n"),
> > + ctx->mntpoint, scrub_nproc(ctx));
> > + fflush(stdout);
> > + }
> > +
> > if (ctx->fsinfo.fs_log) {
> > ctx->logdev = disk_open(ctx->fsinfo.fs_log);
> > if (error) {
> >
next prev parent reply other threads:[~2019-02-04 18:34 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-19 19:29 [PATCH 0/8] xfsprogs: various fixes Darrick J. Wong
2018-12-19 19:29 ` [PATCH 1/8] xfs_scrub_all: walk the lsblk device/fs hierarchy correctly Darrick J. Wong
2019-02-04 18:08 ` Eric Sandeen
2019-02-04 18:16 ` Darrick J. Wong
2019-02-04 18:27 ` Eric Sandeen
2018-12-19 19:29 ` [PATCH 2/8] xfs_scrub_all.timer: activate after most of the system is up Darrick J. Wong
2019-02-04 18:12 ` Eric Sandeen
2018-12-19 19:29 ` [PATCH 3/8] xfs_scrub: rename the global nr_threads Darrick J. Wong
2019-02-04 18:20 ` Eric Sandeen
2018-12-19 19:29 ` [PATCH 4/8] xfs_scrub: use datadev parallelization estimates for thread count Darrick J. Wong
2019-02-04 18:31 ` Eric Sandeen
2019-02-04 18:34 ` Darrick J. Wong [this message]
2018-12-19 19:30 ` [PATCH 5/8] xfs_scrub: use data/rtdev parallelization estimates for the read-verify pool Darrick J. Wong
2019-02-04 18:35 ` Eric Sandeen
2019-02-04 18:38 ` Darrick J. Wong
2019-02-05 2:23 ` Darrick J. Wong
2018-12-19 19:30 ` [PATCH 6/8] xfs_repair: reinitialize the root directory nlink correctly Darrick J. Wong
2018-12-19 20:24 ` Bill O'Donnell
2019-02-04 19:19 ` Eric Sandeen
2018-12-19 19:30 ` [PATCH 7/8] xfs_repair: bump the irec on-disk nlink when adding lost+found Darrick J. Wong
2018-12-19 20:30 ` Bill O'Donnell
2018-12-19 19:30 ` [PATCH 8/8] xfs_repair: fix uninitialized variable warnings Darrick J. Wong
2018-12-19 20:25 ` Bill O'Donnell
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=20190204183449.GZ5761@magnolia \
--to=darrick.wong@oracle.com \
--cc=linux-xfs@vger.kernel.org \
--cc=sandeen@redhat.com \
--cc=sandeen@sandeen.net \
/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