public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] xfs: increase prealloc size to double that of the previous extent
@ 2013-02-19 15:24 Brian Foster
  2013-03-07 18:45 ` Ben Myers
  0 siblings, 1 reply; 2+ messages in thread
From: Brian Foster @ 2013-02-19 15:24 UTC (permalink / raw)
  To: xfs

The updated speculative preallocation algorithm for handling sparse
files can becomes less effective in situations with a high number of
concurrent, sequential writers. The number of writers and amount of
available RAM affect the writeback bandwidth slicing algorithm,
which in turn affects the block allocation pattern of XFS. For
example, running 32 sequential writers on a system with 32GB RAM,
preallocs become fixed at a value of around 128MB (instead of
steadily increasing to the 8GB maximum as sequential writes
proceed).

Update the speculative prealloc heuristic to base the size of the
next prealloc on double the size of the preceding extent. This
preserves the original aggressive speculative preallocation
behavior and continues to accomodate sparse files 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>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
---
Hi,

v2 just updates the commit log description to reflect that the characteristics
of the hardware and workload can affect the allocation pattern and observed
behavior.

Brian

 fs/xfs/xfs_iomap.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

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);
 }
 
-- 
1.7.7.6

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

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH v2] xfs: increase prealloc size to double that of the previous extent
  2013-02-19 15:24 [PATCH v2] xfs: increase prealloc size to double that of the previous extent Brian Foster
@ 2013-03-07 18:45 ` Ben Myers
  0 siblings, 0 replies; 2+ messages in thread
From: Ben Myers @ 2013-03-07 18:45 UTC (permalink / raw)
  To: Brian Foster; +Cc: xfs

On Tue, Feb 19, 2013 at 10:24:41AM -0500, Brian Foster wrote:
> The updated speculative preallocation algorithm for handling sparse
> files can becomes less effective in situations with a high number of
> concurrent, sequential writers. The number of writers and amount of
> available RAM affect the writeback bandwidth slicing algorithm,
> which in turn affects the block allocation pattern of XFS. For
> example, running 32 sequential writers on a system with 32GB RAM,
> preallocs become fixed at a value of around 128MB (instead of
> steadily increasing to the 8GB maximum as sequential writes
> proceed).
> 
> Update the speculative prealloc heuristic to base the size of the
> next prealloc on double the size of the preceding extent. This
> preserves the original aggressive speculative preallocation
> behavior and continues to accomodate sparse files 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>
> Reviewed-by: Dave Chinner <dchinner@redhat.com>

Excuse me.  This is the version I applied.  Not v1.

-Ben

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-03-07 18:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-19 15:24 [PATCH v2] xfs: increase prealloc size to double that of the previous extent Brian Foster
2013-03-07 18:45 ` Ben Myers

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox