[Sheepdog] [PATCH 2/2] sheep: make gateway and io workers configurable
Christoph Hellwig
hch at infradead.org
Thu Apr 12 17:30:10 CEST 2012
On Thu, Apr 12, 2012 at 10:53:22PM +0800, Liu Yuan wrote:
> From: Liu Yuan <tailai.ly at taobao.com>
>
> Most of the time one VM would issue multiple requests in one
> go, so it would be useful to let users to decide how many workers
> are useful if we have more than several VMs in single sheep node.
>
> In a large set nodes of cluster, every single node will get multiple
> concurrent recovery IO requests, so it would be useful to have it as
> configurable.
>
> default 4 workers for both and maximum 128.
I've seen in my benchmarking that's you'd want at least 64 to even
saturate setup with single sata disks per daemon and a few dozens
daemons, which means the default probably should be in that range.
> --- a/sheep/sheep.c
> +++ b/sheep/sheep.c
> @@ -27,6 +27,9 @@
> #define DEFAULT_OBJECT_DIR "/tmp"
> #define LOG_FILE_NAME "sheep.log"
>
> +static int nr_io_worker = 4;
> +static int nr_gateway_worker = 4;
> +
> LIST_HEAD(cluster_drivers);
> static char program_name[] = "sheep";
>
> @@ -37,6 +40,8 @@ static struct option const long_options[] = {
> {"debug", no_argument, NULL, 'd'},
> {"directio", no_argument, NULL, 'D'},
> {"asyncflush", no_argument, NULL, 'a'},
> + {"gworker", required_argument, NULL, 'g'},
> + {"iworker", required_argument, NULL, 'i'},
--nr-gateway-workers and --nr-io-workers would be more descriptive.
More information about the sheepdog
mailing list