I am trying to determine why my nodejs server has extremely high CPU usage. When running top, I can see that the CPU usage for node can hit up to 60% with a single user. I used node-tick to profile my application, but I cannot seem to understand the results well enough to find the source of the problem.
I am using:
socket.io
mongodb
jade-templating
express
Here are the results:
[Shared libraries]:
ticks total nonlib name
31273 88.5% 0.0% b77b7000-b77b8000
2144 6.1% 0.0% /usr/local/bin/node
269 0.8% 0.0% /lib/i386-linux-gnu/libc-2.15.so
45 0.1% 0.0% /lib/i386-linux-gnu/libpthread-2.15.so
13 0.0% 0.0% 2cd46000-2cd47000
11 0.0% 0.0% /usr/lib/i386-linux-gnu/libstdc++.so.6.0.16
2 0.0% 0.0% /lib/i386-linux-gnu/librt-2.15.so
I cannot seem to find this "b77b7000-b77b8000" and google is not yielding many results.
Can anyone determine what is causing my node.js to use so much CPU time?
Yo can use a profiler to inspect performance of stack function by function.In my option Chrome's is the best one. Here is a tutorial about how to use it with nodejs
Once you connected debug console to your Chrome debugger you can use performance tab to record a profile for inspection
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With