public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Nathan Scott <nathans@redhat.com>
To: Mark Seger <mjseger@gmail.com>, Dave Chinner <david@fromorbit.com>
Cc: xfs@oss.sgi.com
Subject: Re: definitions for /proc/fs/xfs/stat
Date: Sun, 16 Jun 2013 21:11:29 -0400 (EDT)	[thread overview]
Message-ID: <419435719.1662203.1371431489790.JavaMail.root@redhat.com> (raw)
In-Reply-To: <CAC2B=ZFZskLnp5baVJK+R1xrpOfTkr1QXpA9jyHvxfk5Wd4yDg@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2571 bytes --]

Hey guys,

----- Original Message -----
> ok, I have a simple reproducer.  try out the following, noting you'll
> obviously have to change the directory pointed to by dname:
> 
> libc=ctypes.CDLL(ctypes.util.find_library('c'), use_errno=True)
> falloc=getattr(libc, 'fallocate')
> 

This is using the glibc fallocate wrapper - I have vague memories of an
old libc which used to do per-page buffered writes providing a poor-mans
implementation of fallocate, maybe somehow that older version/behaviour
is being triggered.

Running the test case on a RHEL6 box here, you should see patterns like
the attached ("pmchart -c XFSLog" - config attached too), which suggest
log traffic dominates (though I have no stripe-fu setup like you, Mark,
which adds another wrinkle).

> This is the same behavior I'm seeing on swift.  10K 1KB files X 4kb minimal
> block size still comes out to a lot less than the multiple GB of writes
> being reported.  Actually since these whole thing only takes a few seconds
> and I know a single disk can't write that fast maybe it's just a bug in the
> way the kernel is reported allocated preallocated blocks and nothing to do
> with XFS?  Or iis xfs responsible for the stats?

The device level IOPs and bandwidth stats are accounted in the block layer,
below the filesystem (at that point, there is no concept of preallocation
anymore - something has submitted actual I/O), whereas the XFS log traffic
accounting is done inside XFS.

> If I remove the fallocate call I see the expected amount of disk traffic.
> 
> -mark
> 
> On Sat, Jun 15, 2013 at 8:11 PM, Dave Chinner <david@fromorbit.com> wrote:
> > On Sat, Jun 15, 2013 at 12:22:35PM -0400, Mark Seger wrote:
> > > I was thinking a little color commentary might be helpful from a
> > > perspective of what the functionally is that's driving the need for
> > > fallocate.  I think I mentioned somewhere in this thread that the
> > > application is OpenStack Swift, which is  a highly scalable cloud object
> > > store.
> >
> > I'm familiar with it and the problems it causes filesystems. What
> > application am I talking about here, for example?
> >
> > http://oss.sgi.com/pipermail/xfs/2013-June/027159.html
> >
> > Basically, Swift is trying to emulate Direct IO because python
> > does't support Direct IO. Hence Swift is hacking around that problem

I think it is still possible, FWIW.  One could use python ctypes (as in
Marks test program) and achieve a page-aligned POSIX memalign, and some
quick googling suggests flags can be passed to open(2) via os.O_DIRECT.

cheers.

--
Nathan

[-- Attachment #2: XFSLog --]
[-- Type: application/octet-stream, Size: 524 bytes --]

#kmchart
version 1

chart title "IOPS over all Disks [%h]" style stacking
	plot legend "Reads" color #ffff00 metric disk.all.read
	plot legend "Writes" color #ee82ee metric disk.all.write
chart style plot antialiasing off
	plot color #ee82ee metric xfs.log.writes
chart title "Disk Throughput [%h]" style stacking
	plot legend "Read rate" color #ffff00 metric disk.all.read_bytes
	plot legend "Write rate" color #ee82ee metric disk.all.write_bytes
chart style plot antialiasing off
	plot color #ee82ee metric xfs.log.blocks

[-- Attachment #3: xfs-log-vs-fallocate.png --]
[-- Type: image/png, Size: 35764 bytes --]

[-- Attachment #4: Type: text/plain, Size: 121 bytes --]

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

  parent reply	other threads:[~2013-06-17  1:11 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-14 16:37 definitions for /proc/fs/xfs/stat Mark Seger
2013-06-14 22:16 ` Nathan Scott
2013-06-14 22:37   ` Mark Seger
2013-06-15  0:17     ` Nathan Scott
2013-06-15  1:55       ` Mark Seger
2013-06-15  2:04         ` Dave Chinner
2013-06-15 10:35           ` Mark Seger
2013-06-15 16:22             ` Mark Seger
2013-06-16  0:11               ` Dave Chinner
2013-06-16 12:58                 ` Mark Seger
2013-06-16 22:06                   ` Dave Chinner
2013-06-16 22:31                     ` Mark Seger
2013-06-16 23:14                       ` Dave Chinner
2013-06-16 23:31                         ` Mark Seger
2013-06-17  1:11                   ` Nathan Scott [this message]
2013-06-17  2:46                     ` Dave Chinner
2013-06-17  5:41                       ` Nathan Scott
2013-06-17 10:57                         ` Mark Seger
2013-06-17 11:13                           ` Dave Chinner
2013-06-17 14:57                             ` Mark Seger
2013-06-17 20:28                               ` Stefan Ring
2013-06-18  0:15                                 ` Dave Chinner
2013-06-18 10:17                                   ` Mark Seger
2013-06-19 23:02                               ` Useful stats (was Re: definitions for /proc/fs/xfs/stat) Nathan Scott
2013-06-17 11:19                         ` definitions for /proc/fs/xfs/stat Dave Chinner
2013-06-17 13:18                           ` Stan Hoeppner
2013-06-18  0:13                     ` Mark Goodwin
2013-06-16  0:00             ` 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=419435719.1662203.1371431489790.JavaMail.root@redhat.com \
    --to=nathans@redhat.com \
    --cc=david@fromorbit.com \
    --cc=mjseger@gmail.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