From 2413a2d3d39409e00a964c8c8c8497c4cdeb438f Mon Sep 17 00:00:00 2001 From: Shyam Date: Mon, 26 Jan 2015 14:20:31 -0500 Subject: epoll: Adding the ability to configure epoll threads Add the ability to configure the number of event threads for various gluster services. Currently with the multi thread epoll patch, it is possible to have more than one thread waiting on socket activity and processing the same. This thread count is currently static, which this commit makes dynamic. The current services which use IO path, i.e brick processes, any client process (nfs, FUSE, gfapi, heal, rebalance, etc.a), gain 2 set parameters to control the number of threads that are processing events. These settings are, - client.event-threads - server.event-threads The client setting affects the client graph consumers, and the server setting affects the brick processes. These are processed and inited/reconfigured using the client/server protocol xlators. Other services (say glusterd) would need to extend similar configuration settings to take advantage of multi threaded event processing. At present glusterd is not enabled with this commit, as it does not stand to gain from this multi-threading (as I understand it). Change-Id: Id8422fc57a9f95a135158eb6477ccf9d3c9ea4d9 BUG: 1104462 Signed-off-by: Shyam Reviewed-on: http://review.gluster.org/9488 Tested-by: Gluster Build System Reviewed-by: Vijay Bellur --- cli/src/cli.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'cli/src') diff --git a/cli/src/cli.c b/cli/src/cli.c index b33ce950e1..cd2825e9c4 100644 --- a/cli/src/cli.c +++ b/cli/src/cli.c @@ -114,7 +114,8 @@ glusterfs_ctx_defaults_init (glusterfs_ctx_t *ctx) if (!ctx->iobuf_pool) return -1; - ctx->event_pool = event_pool_new (DEFAULT_EVENT_POOL_SIZE); + ctx->event_pool = event_pool_new (DEFAULT_EVENT_POOL_SIZE, + STARTING_EVENT_THREADS); if (!ctx->event_pool) return -1; -- cgit