[sheepdog] [PATCH 0/3] work: implement a dynamically changing thread pool
namei.unix at gmail.com
Mon Oct 22 08:30:51 CEST 2012
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).
More information about the sheepdog