public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Dave Chinner <david@fromorbit.com>
To: Brian Foster <bfoster@redhat.com>
Cc: xfs@oss.sgi.com
Subject: Re: [PATCH] xfs: increase prealloc size to double that of the previous extent
Date: Tue, 19 Feb 2013 13:46:24 +1100	[thread overview]
Message-ID: <20130219024624.GE10731@dastard> (raw)
In-Reply-To: <1361231827-58766-1-git-send-email-bfoster@redhat.com>

On Mon, Feb 18, 2013 at 06:57:07PM -0500, Brian Foster wrote:
> The updated speculative preallocation algorithm becomes less
> effective in situations with a high number of concurrent,
> sequential writers. In running 32 sequential writers on a system
> with 32GB RAM, preallocs become fixed at a value of around 128MB.
> Update the heuristic to base the size of the prealloc on double
> the size of the preceding extent. This preserves the original
> aggressive speculative preallocation behavior at a slight cost of
> increasing the size of preallocated data regions following holes of
> sparse files.
> 
> Signed-off-by: Brian Foster <bfoster@redhat.com>
> ---

You probably want to mention that it is the writeback bandwidth
slicing (for fairness across all dirty inodes) that is resulting in
the pattern of allocation that you saw. Hence different machines
with different amounts of RAM and write throughput will therefore
see different results.

> diff --git a/fs/xfs/xfs_iomap.c b/fs/xfs/xfs_iomap.c
> index 912d83d..45a382d 100644
> --- a/fs/xfs/xfs_iomap.c
> +++ b/fs/xfs/xfs_iomap.c
> @@ -362,7 +362,7 @@ xfs_iomap_eof_prealloc_initial_size(
>  	if (imap[0].br_startblock == HOLESTARTBLOCK)
>  		return 0;
>  	if (imap[0].br_blockcount <= (MAXEXTLEN >> 1))
> -		return imap[0].br_blockcount;
> +		return imap[0].br_blockcount << 1;
>  	return XFS_B_TO_FSB(mp, offset);
>  }

Works for me. Thanks Brain.

Reviewed-by: Dave Chinner <dchinner@redhat.com>

-- 
Dave Chinner
david@fromorbit.com

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

  reply	other threads:[~2013-02-19  2:46 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-18 23:57 [PATCH] xfs: increase prealloc size to double that of the previous extent Brian Foster
2013-02-19  2:46 ` Dave Chinner [this message]
2013-03-07 18:43 ` Ben Myers

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=20130219024624.GE10731@dastard \
    --to=david@fromorbit.com \
    --cc=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