[sheepdog] [RFC PATCH] sdnet: threading tx/rx process

HaiTing Yao yaohaiting.wujue at gmail.com
Thu Jul 12 08:18:53 CEST 2012


On Wed, Jul 11, 2012 at 6:11 PM, Liu Yuan <namei.unix at gmail.com> wrote:
> From: Liu Yuan <tailai.ly at taobao.com>
>
> With threaded tx/rx process, we are supposed to improve the scalability of
> sheep gateway performence by overlapping different requests from different
> VMs.
>
> This patch also remove request throttling because we are guaranteed to process
> requests as soon as it arrives and won't block any request.
>
> I'll give numbers soon later
>

At least, we both think tx/rx should use their own threads, not in main thread.

I think your patch perhaps have these problems.

1,  Can not guarantee I/O sequence of VDI. Many tx/rx threads, many io
threds. If two requests r/w the same sector of same VDI, data will be
corrupted.

2,  I did not test the performance of this patch, but I think it will
not be better than before. The time for creating/destroing threads may
be longer than the time for data translation.

If fact with two threadsof one tx thread and one rx thread, there is
performance improvement as I show even with only one VDI. With
multible VDIs, sheep can do other VDI's request when sending the
responcse. The performance is more clear.

With many tx/rx threads, performance will be improved much more. When
I deal with this problem, I have thought this idea, but I did not want
to use short threads. Short threds are too heavy for this. Perhaps we
can implement a thread pool fo tx/rx threads. What's your idea?

Thanks
Wujue



More information about the sheepdog mailing list