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

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

Open
hitzhangjie opened this issue Jun 19, 2023 · 0 comments
Open

Comments

@hitzhangjie
Copy link

hitzhangjie commented Jun 19, 2023

  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?

@hitzhangjie hitzhangjie changed the title The reported CPU usage is much higher than top reported value? The reported CPU usage is much much higher or much lower than top reported value? Jun 19, 2023
@hitzhangjie hitzhangjie changed the title The reported CPU usage is much much higher or much lower than top reported value? The reported CPU usage is much higher or lower than top reported value? Jun 19, 2023
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