Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Report CPU usage for the thread running the libuv event loop. #114

Open
hhellyer opened this issue Sep 25, 2017 · 0 comments
Open

Report CPU usage for the thread running the libuv event loop. #114

hhellyer opened this issue Sep 25, 2017 · 0 comments

Comments

@hhellyer
Copy link
Member

At the moment appmetrics-dash reports the CPU percentages used on the whole machine and by the Node.js process.

On a multi-core box this results in the Node.js process using very little of the total available CPU even if it is performing a CPU bound task. Node.js runs JavaScript code single threaded on the main libuv event loop thread. For example on an 8 way machine even if Node.js is running JavaScript in a tight loop it will only use a maximum of 12.5% of the total available CPU. We should report the percentage of one CPU that thread is using to give the user an idea of how much work is happening on the event loop thread so that in the above case the user could see that 100% of the CPU time available to run JavaScript code is in use.

We might not want to put this on the same chart as the CPU times for the process and system as those will be the percentage of multiple processors worth of CPU time.

(This is a similar problem to what we have seen with memory - the amount of memory used by Node.js is a fraction of what the system has even when it's performing badly.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant