From: Alex Elder Date: Wed, 19 May 2010 22:44:14 +0000 (+0000) Subject: xfstests: 226: have xfs_io use bigger buffers X-Git-Tag: v1.1.0~163 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=8a08cc2d67fe62adee5729e6c8eda3b8ecac2400;p=xfstests-dev.git xfstests: 226: have xfs_io use bigger buffers 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 Reviewed-by: Eric Sandeen --- diff --git a/226 b/226 index e0c66307..6f28ac9d 100755 --- 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