xfs
[Top] [All Lists]

Re: Latencies writing to memory mapped files

To: Shawn Bohrer <shawn.bohrer@xxxxxxxxx>
Subject: Re: Latencies writing to memory mapped files
From: Dave Chinner <david@xxxxxxxxxxxxx>
Date: Thu, 30 Sep 2010 09:19:08 +1000
Cc: xfs@xxxxxxxxxxx
In-reply-to: <20100929153122.GA6707@xxxxxxxxxxxxxxxxxxxxxxxxx>
References: <20100915152633.GA2585@xxxxxxxxxxxxxxxxxxxxxxxxx> <20100916001837.GF24409@dastard> <20100917154523.GA2739@xxxxxxxxxxxxxxxxxxxxxxxxx> <20100920000535.GM24409@dastard> <20100920221726.GA3182@xxxxxxxxxxxxxxxxxxxxxxxxx> <20100920224833.GB2614@dastard> <20100921180541.GA6877@xxxxxxxxxxxxxxxxxxxxxxxxx> <20100921231531.GE2614@dastard> <20100929153122.GA6707@xxxxxxxxxxxxxxxxxxxxxxxxx>
User-agent: Mutt/1.5.20 (2009-06-14)
On Wed, Sep 29, 2010 at 10:31:22AM -0500, Shawn Bohrer wrote:
> On Wed, Sep 22, 2010 at 09:15:31AM +1000, Dave Chinner wrote:
> > On Tue, Sep 21, 2010 at 01:05:41PM -0500, Shawn Bohrer wrote:
> > > So I have no idea what I'm looking at but here is the output for the
> > > above numbers (duplicates removed):
> > > 
> > > xfs_db -r -c "daddr 474487328" -c "print" /dev/sda5
> > > 000: 424d4150 0000007f 00000000 07000082 00000000 07000092 00000000 
> > > 0039a000
> >        ^^^^^^^^
> >         B M A P
> > 
> > #define XFS_BMAP_MAGIC  0x424d4150      /* 'BMAP' */
> > 
> > So these are inode extent btree blocks your application is getting
> > stuck on.  These only get written back as a result of either log
> > pressure (i.e.  tail pushing) or by the xfsbufd based on age. They
> > aren't actually flushed with the data because changes are logged.
> > IOWs, the writeback of the bmap btree blocks is asynchronous to any
> > operation that modifies them, so there's no direct connection
> > between modification and writeback.
> > 
> > I'm not sure that there is anything that can really be done to
> > prevent this. If the cause of writeback is age-based flushing on the
> > metadata buffers, you could try increasing the xfsbufd writeback age
> > so that only log pressure will cause them to be flushed.
> 
> So setting fs.xfs.age_buffer_centisecs to 720000 does seem to help,
> but what are the consequences (if any) of doing this?

It means that metadata will stay active in the log for longer. That
means it is likely that recovery will take longer if your system
crashes. It also means that there may be more latency on transaction
reservation as tail-pushing the log is much more likely to occur
because metadata is not being pushed out by background flushing.

Cheers,

Dave.
-- 
Dave Chinner
david@xxxxxxxxxxxxx

<Prev in Thread] Current Thread [Next in Thread>