Skip to content
Snippets Groups Projects
Commit f8d18bf6 authored by dutor's avatar dutor Committed by GitHub
Browse files

Fixed number of worker thread (#518)

parent 846b368c
No related branches found
No related tags found
No related merge requests found
......@@ -36,8 +36,10 @@
--session_idle_timeout_secs=60000
# The number of threads to accept incoming connections
--num_accept_threads=1
# The number of networking IO threads to process request and return response.
# The number of networking IO threads
--num_netio_threads=1
# The number of threads to execute user queries
--num_worker_threads=1
# HTTP service port
--ws_http_port=13000
# HTTP2 service port
......
......@@ -122,7 +122,7 @@ int main(int argc, char *argv[]) {
gServer->setIdleTimeout(std::chrono::seconds(FLAGS_client_idle_timeout_secs));
// TODO(dutor) This only take effects on NORMAL priority threads
gServer->setNumCPUWorkerThreads(1);
gServer->setNumCPUWorkerThreads(FLAGS_num_worker_threads);
gServer->setCPUWorkerThreadName("executor");
gServer->setNumAcceptThreads(FLAGS_num_accept_threads);
......
......@@ -16,6 +16,7 @@ DEFINE_int32(session_reclaim_interval_secs, 10, "Period we try to reclaim expire
DEFINE_int32(num_netio_threads, 0,
"Number of networking threads, 0 for number of physical CPU cores");
DEFINE_int32(num_accept_threads, 1, "Number of threads to accept incoming connections");
DEFINE_int32(num_worker_threads, 1, "Number of threads to execute user queries");
DEFINE_bool(reuse_port, true, "Whether to turn on the SO_REUSEPORT option");
DEFINE_int32(listen_backlog, 1024, "Backlog of the listen socket");
DEFINE_string(listen_netdev, "any", "The network device to listen on");
......
......@@ -15,6 +15,7 @@ DECLARE_int32(session_idle_timeout_secs);
DECLARE_int32(session_reclaim_interval_secs);
DECLARE_int32(num_netio_threads);
DECLARE_int32(num_accept_threads);
DECLARE_int32(num_worker_threads);
DECLARE_bool(reuse_port);
DECLARE_int32(listen_backlog);
DECLARE_string(listen_netdev);
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment