Find your content:

Search form

You are here

Can we increase UV_THREADPOOL_SIZE in nodejs?

 
Share

Yes. By default 4 is threadpool size however it can be increased. 

In order to change the threadpool size , modify your program

process.env.UV_THREADPOOL_SIZE=64
//then execute some function that requires threadpool
require('fs').readFile('loadtest',function(){});

Today’s operating systems already provide asynchronous interfaces
for many I/O tasks. (Example: AIO on linux)

Whenever possible, libuv will use those async interfaces avoiding usage of
threadpool.Only if there is no other way, the thread pool will be used
for async I/O

My Block Status

My Block Content