nodejs / help

:sparkles: Need help with Node.js? File an Issue here. :rocket:
1.44k stars 276 forks source link

My computer's CPU is AMD 9754, with 128 cores and 256 logic processors. But why does nodejs get 64 through os. cpu(). length? How to obtain the correct logical processor #4435

Open wangzhiguoengineer opened 4 days ago

wangzhiguoengineer commented 4 days ago

Node.js Version

v22.3.0

NPM Version

10.8.1

Operating System

Windows 11 Professional Workstation Edition

Subsystem

child_process, cluster, v8

Description

My computer's CPU is AMD 9754, with 128 cores and 256 logic processors. But why does nodejs get 64 through os. cpu(). length? How to obtain the correct logical processor

Minimal Reproduction

import os from 'os'
console.log(os.cpus().length)

Output

image

image

Before You Submit

RedYetiDev commented 3 days ago

@nodejs/os PTAL

wangzhiguoengineer commented 3 days ago

@nodejs/os PTAL

What does this mean? I didn't understand @RedYetiDev

RedYetiDev commented 3 days ago

"PTAL" means "Please Take A Look", and the @[]()nodejs/os means that I pinged the OS team.

RedYetiDev commented 12 hours ago

Stalled for the @nodejs/os team to take a look. If they don't in a few days I'll reach out.