nodejs / help

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

node --prof: high load of Shared libraries /usr/bin/node #4422

Open denyaalt opened 2 weeks ago

denyaalt commented 2 weeks ago

Node.js Version

v20.12.0

Operating System

Debian 6.1.69-1 (2023-12-30) x86_64 GNU/Linux

Description

Hi, I am testing node with network load and I get the following profiling results:

 [Shared libraries]:
   ticks  total  nonlib   name
  285518   63.3%          /usr/bin/node
  21547    4.8%          /usr/lib/x86_64-linux-gnu/libc.so.6
    770    0.2%          [vdso]
    231    0.1%          /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.30
    114    0.0%          /usr/lib/x86_64-linux-gnu/libm.so.6

 [Summary]:
   ticks  total  nonlib   name
  44333    9.8%   31.0%  JavaScript
  43387    9.6%   30.3%  C++
  19641    4.4%   13.7%  GC
  308180   68.3%          Shared libraries
  55499   12.3%          Unaccounted

There is a high CPU load on the node itself, but what does this mean? What is the bottleneck?

P.S. My node script receives 10k TCP packets from different clients and sends 20k TCP packets to other clients.

preveen-stack commented 1 week ago

Can you share the configuration of the machine

denyaalt commented 1 week ago

How does the hardware configuration matter in answering my question? If the hardware is more powerful, it can handle more traffic; if it is weaker, it can handle less.

My question is what does Shared libraries and /usr/bin/node mean in profiling report?