Skip to content

Set UV_THREADPOOL_SIZE dinamically on startup #193

@RafaelGSS

Description

@RafaelGSS

Thread: https://openjs-foundation.slack.com/archives/C049LSE8QBH/p1769010116581549

We came up with a default idea that switching the default 4 threads to:

UV_THREADPOOL_SIZE="$(getconf _NPROCESSORS_ONLN) > 4 ? (getconf _NPROCESSORS_ONLN) : 4"

Might have a good impact on powerful machines. However, before taking any action, we should have some measurements:

  1. Benchmark a different set of machines
  • 4vCPUs
  • 2vCPUs
  • 8vCPUs
  1. Define a minimal HTTP server that serves a file
  2. Provide load on it until 4 threads become saturated (define the threshold)
  3. Bump UV_THREADPOOL_SIZE and see how it behaves.

Metadata

Metadata

Assignees

No one assigned

    Labels

    benchmark-neededAdd to issues that does not have a benchmark

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions