Skip to content

process.report.getReport slower from 20.2.0 to 20.3.0 on Linux #48831

@H4ad

Description

@H4ad

Script:

const now = performance.now();
process.report.getReport()
console.log(`Took ${performance.now() - now}ms`);

On Node 20.2.0:

> node get-report.js
Took 26.467950999736786ms

On node 20.3.0

> node get-report.js
609.6318630054593ms

I did a bisect and the commit that introduced this slowdown was bfcb3d1, which is the upgrade of libuv.

But the actual problem was introduced (I think) at libuv/libuv@434eb4b, the slowdown is caused because instead of assuming the same information for all CPUs, now libuv read the /sys/devices/system/cpu/cpu%u/cpufreq/scaling_cur_freq for every CPU.

I'll also open an issue on libuv, but I want to keep it open just to track this slowdown.

My machine:

  • Ryzen 9 5950X 3.4GHz, 16-Cores 32-Threads
  • 32GB of Memory.

cc @nodejs/performance

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions