[sheepdog] [PATCH 0/3] work: implement a dynamically changing thread pool
morita.kazutaka at lab.ntt.co.jp
Mon Oct 22 08:43:37 CEST 2012
At Mon, 22 Oct 2012 14:30:51 +0800,
Liu Yuan wrote:
> On 10/22/2012 12:31 PM, MORITA Kazutaka wrote:
> > Currently, sheep calls a pthread_create for every I/O request, but the
> > overhead is not so cheap. On my environment, it takes 320
> > microseconds for sheep to process 4 KB write, but I found that sheep
> > spends 30~40 microseconds in pthread_create.
> > This series removes a short thread and implements a dynamic worker
> > thread pool based on the previous work queue implementation. With
> > this series, the 4 KB write performance was increased from 3100 IOPS
> > to 3350 IOPS on my environment.
> It is indeed a booster, but I guess just in some conditions (I guess you
> might measure it on a single local node and minimize the network
> overhead). With network added in the path, the booster might be smaller.
> Do you too measure how much time pthread_cond_signal() & wakeup take? I
> guess signal & wakeup mechanism will be deteriorated with heavy
> workloads, so probably this booster might be neutralized. But I am not
> sure which one will perform better in heavy workloads, clone() syscall
> or pthread signaling(I suspect that pthread signal also use system calls
> to signal & wakeup, and if there is single internal wakeup queue, this
> would be bottleneck).
Yes, we need more numbers with various conditions to change the
design. (I like this patch implementation, which uses the same code
with ordered work queue, though.)
I think of trying it, but I wish more users would test it too.
More information about the sheepdog