[sheepdog] [PATCH] sheep: use tx/rx thread for data transfer
Liu Yuan
namei.unix at gmail.com
Thu Jul 12 11:03:13 CEST 2012
On 07/12/2012 03:34 PM, Liu Yuan wrote:
> I have run a simple test to test your patch and mine with vanilla code
> and no benefit is shown:
>
> yours mine vanilla
> 67s 68s 65s
I did both read and write test, see following result:
nr 2 4 8
mine 26/8 39/8 71/11
yours 27/8 41/8 74/11
vanilla 25/9 41/7 73/11
26/8 means write use 26 second and read use 8 seconds.
This test shows we don't get any benefit from threaded tx/rx.
$ ./test.sh nr
===============
#!/bin/bash
pkill -9 sheep
pkill -9 collie
rm store/* -rf
nr=`seq 1 $1`
echo $nr
for i in `seq 0 7`; do sheep/sheep -d /home/tailai.ly/sheepdog/store/$i
-z $i -p $((7000+$i));sleep 1;done
for ((;;)); do
if [ $(collie/collie node list | wc -l) -ne 9 ]; then
sleep 1
else
break
fi
done
collie/collie cluster format -c 3
sleep 1
time1=`date +%s`
for i in $nr;do
collie/collie vdi create test$i 100M
done
sleep 1
for i in $nr;do
dd if=/dev/urandom | collie/collie vdi write test$i -p 7000 &
done
echo wait for write to finish
for ((;;)); do
if [ "$(pgrep collie)" ]; then
sleep 1
else
break
fi
done
time2=`date +%s`
echo write $(($time2 - $time1))
for i in $nr;do
./collie/collie vdi read test$i -p 7000 | md5sum &
done
for ((;;)); do
if [ "$(pgrep collie)" ]; then
sleep 1
else
break
fi
done
time3=`date +%s`
echo read $(($time3 - $time2))
More information about the sheepdog
mailing list