Investigate thread pool implementation and record the design into a document
marktwtn opened this issue · comments
marktwtn commented
As described from @jserv : #93 (comment)
We should investigate the thread pool design of libtuv
and explain the model in the document docs/threading-model.md
.
The document may include the information of thread pool, SMP affinity, load balancing, etc.
The goal is to create the document with the information of thread pool model at least.
marktwtn commented
The size of libtuv
thread pool can be controlled by two factor:
- Source code:
static uv_thread_t default_threads[4];
- Environment variable:
UV_THREADPOOL_SIZE
Environment variable has the higher priority.
The maximum thread number is 128(MAX_THREADPOOL_SIZE).