Skip to content

Commit

Permalink
doc: clarify UV_THREADPOOL_SIZE env var usage
Browse files Browse the repository at this point in the history
Setting of UV_THREADPOOL_SIZE from inside process using
process.env.UV_THREADPOOL_SIZE is not guaranteed to work as
the thread pool would have been created as part of the runtime
initialisation much before user code is run.

update doc/api/cli.md
  • Loading branch information
preveen-stack committed Nov 13, 2024
1 parent 598bbf4 commit d2370de
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions doc/api/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -3450,8 +3450,9 @@ reason any of these APIs takes a long time, other (seemingly unrelated) APIs
that run in libuv's threadpool will experience degraded performance. In order to
mitigate this issue, one potential solution is to increase the size of libuv's
threadpool by setting the `'UV_THREADPOOL_SIZE'` environment variable to a value
greater than `4` (its current default value). For more information, see the
[libuv threadpool documentation][].
greater than `4` (its current default value). However, setting this from inside
javascript using `process.env.UV_THREADPOOL_SIZE=size` is not guranteed to work.
For more information, see the [libuv threadpool documentation][].

## Useful V8 options

Expand Down

0 comments on commit d2370de

Please sign in to comment.