[Sheepdog] [PATCH 0/2] object list testing script

Li Wenpeng levin108 at gmail.com
Thu Mar 1 12:16:23 CET 2012

I wrote a bash script to test the performance of object list cache:


pkill -9 sheep
rm /root/sheepdog/store/* -rf
for i in 0 1 2 3 4 5 6 7 8; do
    echo "initializing sheep on port 700$i"
    sheep/sheep -d /root/sheepdog/store/$i -z $i -p 700$i;
    sleep 1;
collie/collie cluster format -c 3 -b "farm"
qemu-img create -f raw sheepdog:debian 2G
qemu-io -c "write -P 0x1 0 10M" sheepdog:debian

ps aux | grep "sheep.*1$" | awk '{print $2}' | xargs kill -9
sleep 2

qemu-io -c "write -P 0x1 0 1000M" sheepdog:debian
qemu-io -c "write -P 0x1 1000M 1000M" sheepdog:debian

collie/collie debug trace -e

ps aux | grep "sheep.*5$" | awk '{print $2}' | xargs kill -9

sheep/sheep -d /root/sheepdog/store/14/ -z 14 -p 7014;

sleep 600

collie/collie debug trace -t
collie/collie debug trace -C > trace.txt

Before the patch is applied, it takes tens of thousands of microseconds
to execute the function get_obj_list() in store.c, while with the patch
it only takes dozens of microseconds.

The object list cache avoids too much IO in get_obj_list(), so it runs
much faster and saves resource.

More information about the sheepdog mailing list