From: Nicholas Piggin <npiggin@gmail.com>
To: Dave Chinner <david@fromorbit.com>
Cc: linux-xfs@vger.kernel.org, Christoph Hellwig <hch@lst.de>,
Dave Chinner <dchinner@redhat.com>
Subject: Re: [rfc] larger batches for crc32c
Date: Fri, 4 Nov 2016 13:28:07 +1100 [thread overview]
Message-ID: <20161104132807.4cdbb78d@roar.ozlabs.ibm.com> (raw)
In-Reply-To: <20161104001248.GD28177@dastard>
On Fri, 4 Nov 2016 11:12:48 +1100
Dave Chinner <david@fromorbit.com> wrote:
> On Fri, Oct 28, 2016 at 03:17:47AM +1100, Nicholas Piggin wrote:
> > Hi guys,
> >
> > We're seeing crc32c_le show up in xfs log checksumming on a MySQL benchmark
> > on powerpc. I could reproduce similar overheads with dbench as well.
> >
> > 1.11% mysqld [kernel.vmlinux] [k] __crc32c_le
> > |
> > ---__crc32c_le
> > |
> > --1.11%--chksum_update
> > |
> > --1.11%--crypto_shash_update
> > crc32c
> > xlog_cksum
> > xlog_sync
> > _xfs_log_force_lsn
> > xfs_file_fsync
> > vfs_fsync_range
> > do_fsync
> > sys_fsync
> > system_call
> > 0x17738
> > 0x17704
> > os_file_flush_func
> > fil_flush
> >
> > As a rule, it helps the crc implementation if it can operate on as large a
> > chunk as possible (alignment, startup overhead, etc). So I did a quick hack
> > at getting XFS checksumming to feed crc32c() with larger chunks, by setting
> > the existing crc to 0 before running over the entire buffer. Together with
> > some small work on the powerpc crc implementation, crc drops below 0.1%.
> >
> > I don't know if something like this would be acceptable? It's not pretty,
> > but I didn't see an easier way.
>
> Here's an alternative, slightly cleaner patch that optimises the CRC
> update side but leaves the verify side as it is. I've not yet
> decided exactly what is cleanest for the xlog_cksum() call in log
> recovery, but that won't change the performance of the code. Can
> you give this a run through, Nick?
Hi Dave,
Yeah sorry for the slow response, I've been getting a more realistic
MySQL benchmark setup working (what I had reproduced what appeared to
be the same overhead, but I wanted to get something better to retest
with). So your patch comes at a good time (and thanks for working on
it). I'll see if I can get something running and have results for you
by next week.
Thanks,
Nick
prev parent reply other threads:[~2016-11-04 2:28 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-27 16:17 [rfc] larger batches for crc32c Nicholas Piggin
2016-10-27 18:29 ` Darrick J. Wong
2016-10-28 3:21 ` Nicholas Piggin
2016-10-27 21:42 ` Dave Chinner
2016-10-27 23:16 ` Dave Chinner
2016-10-28 2:12 ` Nicholas Piggin
2016-10-28 4:29 ` Dave Chinner
2016-10-28 5:02 ` Nicholas Piggin
2016-10-31 3:08 ` Dave Chinner
2016-11-01 3:39 ` Nicholas Piggin
2016-11-01 5:47 ` Dave Chinner
2016-11-02 2:18 ` [rfe]: finobt option separable from crc option? (was [rfc] larger batches for crc32c) L.A. Walsh
2016-11-03 8:29 ` Dave Chinner
2016-11-03 16:04 ` L.A. Walsh
2016-11-03 18:15 ` Eric Sandeen
2016-11-03 23:00 ` Dave Chinner
2016-11-04 6:56 ` L.A. Walsh
2016-11-04 17:37 ` Eric Sandeen
2016-11-04 0:12 ` [rfc] larger batches for crc32c Dave Chinner
2016-11-04 2:28 ` Nicholas Piggin [this message]
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=20161104132807.4cdbb78d@roar.ozlabs.ibm.com \
--to=npiggin@gmail.com \
--cc=david@fromorbit.com \
--cc=dchinner@redhat.com \
--cc=hch@lst.de \
--cc=linux-xfs@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).