Skip to content

x/net/http2: High CPU usage on light traffic #68414

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

Closed
ttc0419 opened this issue Jul 15, 2024 · 2 comments
Closed

x/net/http2: High CPU usage on light traffic #68414

ttc0419 opened this issue Jul 15, 2024 · 2 comments

Comments

@ttc0419
Copy link

ttc0419 commented Jul 15, 2024

Go version

go version go1.21.6 linux/amd64

Output of go env in your module/workspace:

default

What did you do?

Stream k8s pod log using we socket using client-go library, which uses http2

What did you see happen?

High CPU usage in pipe read and mutex time on one CPU core.

pprof.kube-term.samples.cpu.001.pb.gz

What did you expect to see?

Lower CPU usage

@ttc0419 ttc0419 changed the title x/net/http2: High CPU usage with light traffic x/net/http2: High CPU usage on light traffic Jul 15, 2024
@seankhliao
Copy link
Member

I believe this should first be a kubernetes issue, they have a nonstandard setup with SPDY

@seankhliao seankhliao closed this as not planned Won't fix, can't repro, duplicate, stale Jul 15, 2024
@ttc0419
Copy link
Author

ttc0419 commented Jul 15, 2024

@seankhliao Are you talking about remotecommand.NewSPDYExecutor? What I used is the request.Stream. And the pprof did show golang.org/x/net/http2.transportResponseBody.Read used most of the CPU time not any of the kubernetes library.

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