From: Eric Sandeen <sandeen@sandeen.net>
To: Alex Elder <aelder@sgi.com>
Cc: xfs@oss.sgi.com
Subject: Re: xfstests: 226: have xfs_io use bigger buffers
Date: Wed, 19 May 2010 23:39:52 -0500 [thread overview]
Message-ID: <4BF4BD18.1020608@sandeen.net> (raw)
In-Reply-To: <201005192244.o4JMiEPY014864@stout.americas.sgi.com>
Alex Elder wrote:
> By default xfs_io uses a buffer size of 4096 bytes. On test 226,
> the result is that the test runs much slower (at least an order
> of magnitude) than it needs to.
>
> Add a flag to the "pwrite" command sent to xfs_io so it uses
> larger buffers, thereby speeding things up considerably.
>
> Signed-off-by: Alex Elder <aelder@sgi.com>
Reviewed-by: Eric Sandeen <sandeen@sandeen.net>
>
> ---
> 226 | 9 +++++++--
> 1 file changed, 7 insertions(+), 2 deletions(-)
>
> Index: b/226
> ===================================================================
> --- a/226
> +++ b/226
> @@ -49,10 +49,14 @@ _scratch_mount
>
> loops=16
>
> +# Buffer size argument supplied to xfs_io "pwrite" command
> +buffer="-b $(expr 512 \* 1024)"
> +
> echo "--> $loops buffered 64m writes in a loop"
> for I in `seq 1 $loops`; do
> echo -n "$I "
> - xfs_io -F -f -c 'pwrite 0 64m' $SCRATCH_MNT/test >> $seq.full
> + xfs_io -F -f \
> + -c "pwrite ${buffer} 0 64m" $SCRATCH_MNT/test >> $seq.full
> rm -f $SCRATCH_MNT/test
> done
>
> @@ -63,7 +67,8 @@ _scratch_mount
> echo "--> $loops direct 64m writes in a loop"
> for I in `seq 1 $loops`; do
> echo -n "$I "
> - xfs_io -F -f -d -c 'pwrite 0 64m' $SCRATCH_MNT/test >> $seq.full
> + xfs_io -F -f -d \
> + -c "pwrite ${buffer} 0 64m" $SCRATCH_MNT/test >> $seq.full
> rm -f $SCRATCH_MNT/test
> done
>
>
> _______________________________________________
> xfs mailing list
> xfs@oss.sgi.com
> http://oss.sgi.com/mailman/listinfo/xfs
>
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
prev parent reply other threads:[~2010-05-20 4:37 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-19 22:44 xfstests: 226: have xfs_io use bigger buffers Alex Elder
2010-05-20 4:39 ` Eric Sandeen [this message]
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=4BF4BD18.1020608@sandeen.net \
--to=sandeen@sandeen.net \
--cc=aelder@sgi.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.