Comments (4)
Thanks for your response. elastic-apm-node is a module I added to help me tracking down my performance issue 😕
I will try without this module.
from help.
I finally obtained a flamegraph, thanks to 0x. As I feared, it seems my high CPU is mostly coming from my HTTP sending, using axios. I will try using a Worker to avoid blocking my app.
FYI, what we were seeing on elastic-apm-node seems to only be a wrapper, hiding the real culprit.
Thanks.
from help.
After that issue, I brushed up on my knowledge of profiling reports, but I'm still a bit rusty, but here's a go:
[Shared libraries]:
ticks total nonlib name
100357 61.4% /usr/local/nvm/versions/node/v18.9.0/bin/node
37636 23.0% /usr/lib/x86_64-linux-gnu/libc-2.31.so
4053 2.5% /usr/lib/x86_64-linux-gnu/libpthread-2.31.so
339 0.2% /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.28
130 0.1% [vdso]
This section, at the top, refers to what parts are using how much CPU. As you can see, the CPP libraries are using some, as they are the backbone of Node.js.
Node itself is using a large portion of the CPU, typically in response to whatever code you are running.
Looking down at the report, elastic-apm-node
(especially the http-apm-client
files) appears to be using a decent amount of CPU, so maybe that's the bottleneck?
Additionally, there's also flamegraphs. These are human-visualizable graphs of CPU usage. They could also help you identify what parts of your script are using the most CPU (https://nodejs.org/en/learn/diagnostics/flame-graphs)
from help.
Thanks for your response. elastic-apm-node is a module I added to help me tracking down my performance issue 😕
I will try without this module.
Haha. Well, according to the profile report, it looks like knex
is also using a lot of CPU. I highly recommend flamegraphs to determine what functions are using the most CPU.
from help.
Related Issues (20)
- ExecSync command fails without any error in the command being executed HOT 6
- Handling "Unhandled 'error' event emitted" HOT 1
- CONOUT$ no longer available for Node 22? HOT 1
- TZ env variable is not working properly since Mexico remove DST HOT 2
- Need help deploying (no package.json apparently, even though i do) HOT 1
- Error while open exe file HOT 19
- Issue downloading yaml file HOT 2
- How to verify the signed message against the signature with raw ec public key only HOT 1
- stream.pipeline adds many close listeners, which can easily lead to MaxListenersExceededWarning HOT 2
- Failed to cross-complie fully-static nodejs with arm-linux-gnueabihf complier HOT 4
- http2.request is downloading data with a very slow speed, if the network latency is significant HOT 2
- ip package not updated in expected nodejs/npm versions HOT 1
- npm run dev command is not working HOT 3
- Unable to install node image due to gpg check failed HOT 3
- Embedding integration questions (thread, stdout, cwd) HOT 3
- Cannot test locally committed code to Node.js in my PC. HOT 8
- "-sh: ./node: not found" on ARM platform HOT 1
- How to Enable Fast API Calls in Embedded Development HOT 1
- TENTANDO INSTALAR O YARN HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from help.