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>
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
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