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

Profile CPU + I/O #26

Open
Yamakaky opened this issue Jan 10, 2023 · 2 comments
Open

Profile CPU + I/O #26

Yamakaky opened this issue Jan 10, 2023 · 2 comments

Comments

@Yamakaky
Copy link

By default, pprof only counts the CPU usage of a trace and not the I/O time. In my case, I have multiple microservices that spend the majority of their time calling themselves and the database, so the CPU flamegraph is of limited use. For example, one API endpoint takes 200ms to call another service, but only 0-1 samples are recorded in pyroscope since so little time is spent in CPU. This means the link for the opentelemetry trace is empty most of the time.

I see https://github.com/felixge/fgprof seems to do what I need. It is implemented as a standalone HTTP handler, so this would need extracting the relevant code from https://github.com/felixge/fgprof/blob/master/fgprof.go, or working with them to split the handler from the business code.

I could help for that.

@kolesnikovae
Copy link
Contributor

kolesnikovae commented Jan 10, 2023

Yeah, CPU wall time profile can be extremely useful in certain cases.

Are you using pull mode or Go client (push)? As for supporting fgprof pprof endpoint – I think pyroscope server should be able to pull data, but this will require some extra configuration (for example, grafana/pyroscope#768 (comment)) – I'll give it a try this week and get back with results

I'm not 100% sure we want to add a dependency to our Go client but we will discuss it internally

@Yamakaky
Copy link
Author

I'm using push, I use a centralized server for multiple dynamic instances so pull mode is complicated.

https://www.brendangregg.com/offcpuanalysis.html indicates cpu wall time can have a noticeable performance impact, si maybe add it as an option?

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

2 participants