public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Dave Chinner <david@fromorbit.com>
To: Shrinand Javadekar <shrinand@maginatics.com>
Cc: xfs@oss.sgi.com
Subject: Re: XFS Syncd
Date: Fri, 10 Apr 2015 16:32:10 +1000	[thread overview]
Message-ID: <20150410063210.GJ15810@dastard> (raw)
In-Reply-To: <CABppvi6pC4qEFZUTesbT0v5agbd67MP4dEoUbaVFwEyCv4h21g@mail.gmail.com>

On Thu, Apr 09, 2015 at 09:23:55PM -0700, Shrinand Javadekar wrote:
> Hi,
> 
> I am using the XFS filesystem as the backend for Openstack Swift. On
> my setup, I have a single server with 8 data disks; each of them is
> one XFS volume.
> 
> I am running a workload which does many concurrent writes of 256K
> files into the XFS volumes. Openstack Swift takes care of evenly
> distributing the data across all the 8 disks. It also uses extended
> attributes for each of the files it writes. It also explicitly does a
> fsync() at the end for each file.

What's xfssyncd? :P

$ ps waux |grep [x]fs
root       192  0.0  0.0      0     0 ?        S<   Mar16   0:00 [xfsalloc]
root       193  0.0  0.0      0     0 ?        S<   Mar16   0:00 [xfs_mru_cache]
root       194  0.0  0.0      0     0 ?        S<   Mar16   0:00 [xfslogd]
root       196  0.0  0.0      0     0 ?        S<   Mar16   0:00 [xfs-data/md0]
root       197  0.0  0.0      0     0 ?        S<   Mar16   0:00 [xfs-conv/md0]
root       198  0.0  0.0      0     0 ?        S<   Mar16   0:00 [xfs-cil/md0]
root       199  0.1  0.0      0     0 ?        S    Mar16  40:27 [xfsaild/md0]
$

Oh, right, it's that workqueue we removed in late 2012 (in the 3.7
cycle) because it was redundant. The only remaining fragment of it
is the xfslogd. What kernel are you running?

> I am seeing a behavior where the system pretty much stalls for ~5
> seconds after every 30 seconds. I see that the # of ios goes up but
> the actual write bandwidth during this 5 second period is very low
> (see attached images). After a fair bit of investigation, we've
> narrowed down the problem to XFS's syncd (fs.xfs.xfssyncd_centisecs).
> This runs at a default interval of 30 seconds.

It's doing background inode reclaim which, under some circumstances,
involves truncating specualtive allocation beyond EOF before reclaim
occurs, which results in transactions and inode writeback. It was
highly inefficient, which is why we replaced it.

> I have a couple of questions:
> 
> 1. If all file writes are done with an fsync() at the end, what is
> xfssyncd doing for several seconds?
> 2. How does xfssyncd actually work across several disks? Currently, it
> seems that when it runs, it pretty much stalls the entire system.

xfssyncd was actually a workqueue, so it services multiple
filesystems at once. Before that, there was a kernel thread per
filesystem for it. Anyway, it's doing lots of random write IO and
saturating your disks, which will stall any system that is dependent
on IO throughput to function.

> 3. I see that fs.xfs.xfssyncd_centisecs is the parameter to tune the
> interval. But that doesn't give us much. Increasing the interval
> simply postpones the work. When xfssyncd runs, it takes more time. Are
> there any other options I can try to make xfssyncd not stall the
> system when it runs?

Upgrade your kernel to something more recent, and the problem should
go away.

Cheers,

Dave.
-- 
Dave Chinner
david@fromorbit.com

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

  reply	other threads:[~2015-04-10  6:32 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-10  4:23 XFS Syncd Shrinand Javadekar
2015-04-10  6:32 ` Dave Chinner [this message]
2015-04-10  6:51   ` Shrinand Javadekar
2015-04-10  7:21     ` Dave Chinner
2015-04-10  7:29       ` Shrinand Javadekar
2015-04-10 13:12         ` Dave Chinner
2015-06-02 18:43           ` Shrinand Javadekar
2015-06-03  3:57             ` Dave Chinner
2015-06-03 23:18               ` Shrinand Javadekar
2015-06-04  0:35                 ` Dave Chinner
2015-06-04  0:58                   ` Shrinand Javadekar
2015-06-04  1:55                     ` Dave Chinner
2015-06-04  1:25                   ` Dave Chinner
2015-06-04  2:03                     ` Dave Chinner
2015-06-04  6:23                       ` Dave Chinner
2015-06-04  7:26                         ` Shrinand Javadekar
2015-06-04 22:08                           ` Dave Chinner
2015-06-05  0:59                         ` Shrinand Javadekar
2015-06-05 17:31                           ` Shrinand Javadekar
2015-06-08 21:56                             ` Shrinand Javadekar
2015-06-09 23:12                               ` Dave Chinner

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=20150410063210.GJ15810@dastard \
    --to=david@fromorbit.com \
    --cc=shrinand@maginatics.com \
    --cc=xfs@oss.sgi.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