public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Brian Foster <bfoster@redhat.com>
To: xfs@oss.sgi.com
Subject: [PATCH 0/4] speculative preallocation quota throttling
Date: Wed,  5 Dec 2012 11:47:54 -0500	[thread overview]
Message-ID: <1354726078-31793-1-git-send-email-bfoster@redhat.com> (raw)

Hi All,

This set is intended to enable throttling of speculative preallocation as we
approach EDQUOT. Currently, speculative preallocation is throttled only as we
approach global ENOSPC. The addition of quota prealloc. throttling helps prevent
performance issues (e.g., via reduction of prealloc, ENOSPC, inode flush
sequences) and premature errors in this scenario.

Functional Description
XFS speculative preallocation quota throttling is controlled via the hard and
soft quota limits. Preallocation is throttled against the hard limit with a
default prealloc. maximum of 5% free space in the quota. Preallocation is
disabled if the hard limit is surpassed (i.e., noenforce).

If a soft quota limit is set, it is used as a watermark to enable throttling.
The difference between the soft and hard limits also scales the throttling
percentage heuristic (i.e., a 10% difference between the hard and soft limit
adjusts the prealloc throttling heuristic to 10%).

Testing
I've tested this functionality by running 32 concurrent writers (18G each, to
trigger max prealloc requests when files are >8GB) into a project quota of
576GB [1]. Without quota throttling, I'm able to write ~528GB before errors
propagate to the test program and writing stops. With quota throttling enabled
(using the default 5% limit), the test writes ~576GB. With a 10% throttle, the
test stops at ~564GB.

I'm pretty sure I've run this through xfstests in the past, but I don't have a
record of results so I'll be running this through some tests soon.

Brian

P.S., I was originally planning to include eofblocks based handling of EDQUOT
errors in this set but I have more studying up and hacking to do there. It's
easier for me to carry that as an independent set.

[1] - Using the following iozone command:
	iozone -w -c -e -i 0 -+n -r 4k -s 18g -t 32 -F /mnt/file{0..31}

Brian Foster (4):
  xfs: reorganize xfs_iomap_prealloc_size to remove indentation
  xfs: push rounddown_pow_of_two() to after prealloc throttle
  xfs: add quota-driven speculative preallocation throttling
  xfs: preallocation throttling tracepoints

 fs/xfs/xfs_iomap.c |  173 +++++++++++++++++++++++++++++++++++++++++++---------
 fs/xfs/xfs_iomap.h |    2 +
 fs/xfs/xfs_trace.h |   62 +++++++++++++++++++
 3 files changed, 209 insertions(+), 28 deletions(-)

-- 
1.7.7.6

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

             reply	other threads:[~2012-12-05 16:43 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-05 16:47 Brian Foster [this message]
2012-12-05 16:47 ` [PATCH 1/4] xfs: reorganize xfs_iomap_prealloc_size to remove indentation Brian Foster
2012-12-05 16:47 ` [PATCH 2/4] xfs: push rounddown_pow_of_two() to after prealloc throttle Brian Foster
2012-12-05 16:47 ` [PATCH 3/4] xfs: add quota-driven speculative preallocation throttling Brian Foster
2012-12-05 16:47 ` [PATCH 4/4] xfs: preallocation throttling tracepoints Brian Foster

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=1354726078-31793-1-git-send-email-bfoster@redhat.com \
    --to=bfoster@redhat.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