[sheepdog] [PATCH] sheep: use tx/rx thread for data transfer

HaiTing Yao yaohaiting.wujue at gmail.com
Wed Jul 11 11:27:10 CEST 2012


I tested one 1G sized VDI I/O.

Reading performance has improvment.

Before using tx/rx threads

[root at v134092.sqa.cm4 regression_test]#  date;collie vdi read v1 >
/dev/null;date
Wed Jul 11 16:25:44 CST 2012
Wed Jul 11 16:26:22 CST 2012
==38s
[root at v134092.sqa.cm4 regression_test]#  date;collie vdi read v1 >
/dev/null;date
Wed Jul 11 16:26:32 CST 2012
Wed Jul 11 16:27:05 CST 2012
==33s
[root at v134092.sqa.cm4 regression_test]#  date;collie vdi read v1 >
/dev/null;date
Wed Jul 11 16:27:17 CST 2012
Wed Jul 11 16:27:54 CST 2012
==37s

After using tx/rx threads

[root at v134092.sqa.cm4 regression_test]#  date;collie vdi read v1 >
/dev/null;date
Wed Jul 11 16:36:08 CST 2012
Wed Jul 11 16:36:32 CST 2012
==24s
[root at v134092.sqa.cm4 regression_test]#  date;collie vdi read v1 >
/dev/null;date
Wed Jul 11 16:36:42 CST 2012
Wed Jul 11 16:37:10 CST 2012
==28s
[root at v134092.sqa.cm4 regression_test]#  date;collie vdi read v1 >
/dev/null;date
Wed Jul 11 16:37:37 CST 2012
Wed Jul 11 16:38:02 CST 2012
==25s

Writting performance is not clear with one 1G sized VDI, but it not
worse than before.

Thanks
Wujue


On Wed, Jul 11, 2012 at 5:10 PM,  <yaohaiting.wujue at gmail.com> wrote:
> From: HaiTing Yao <wujue.yht at taobao.com>
>
> tx/rx are in main thead now. Then the tx/rx can not be done at the same
> time. The tx/rx will also delay the epoll event.
>
> I use one thread for tx and one thread for rx. This improve the
> performance.
>
> Signed-off-by: HaiTing Yao <wujue.yht at taobao.com>
> ---
>  sheep/sdnet.c      |  173 +++++++++++++++++++++++++++++++++++++---------------
>  sheep/sheep.c      |    2 +
>  sheep/sheep_priv.h |    2 +
>  3 files changed, 127 insertions(+), 50 deletions(-)
>



More information about the sheepdog mailing list