Skip to content

Latest commit

 

History

History
10 lines (7 loc) · 305 Bytes

File metadata and controls

10 lines (7 loc) · 305 Bytes

Increasing number of threads of libuv

Back

nodejs utilizes libuv internally for the event loop. By default it uses a 4 threads, this can be increased by setting the env UV_THREADPOOL_SIZE

const OS = require('os')
process.env.UV_THREADPOOL_SIZE = OS.cpus().length