google / google/gops

The reported CPU usage is much higher or lower than top reported value?

Open
#216 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
7k
Forks
334
PR merge metrics
No merged PRs in 30d

Description

1) testcase: gops cpu usage >> top cpu usage
in my testcase, there're heavy RPC request/response, create goroutines, chan read and chan send.
The gops reported CPU usage is much higher than top reported value. What's the differences btw the methods used by gops and top? Which one is more accurate?

2) testcase: gops cpu usage << top cpu usage
in this testcase, there's some sync.Mutex lock and lock, chan send, chan read.

I learned gops uses go runtime statistics to calucuate it, and top uses syscall to calculate it. If I care more about actual system load, top is more accurate?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.