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

runtime: higher system cpu cost by runtime.freespan #54517

Open
zdyj3170101136 opened this issue Aug 18, 2022 · 0 comments
Open

runtime: higher system cpu cost by runtime.freespan #54517

zdyj3170101136 opened this issue Aug 18, 2022 · 0 comments
Labels
compiler/runtime Issues related to the Go compiler and/or runtime. NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@zdyj3170101136
Copy link

What version of Go are you using (go version)?

$ go version
go version go1.19 darwin/arm64

Does this issue reproduce with the latest release?

yes

What operating system and processor architecture are you using (go env)?

$ perf script --header
# arch : x86_64
# nrcpus online : 104
# nrcpus avail : 104
# cpudesc : Intel(R) Xeon(R) Platinum 8269CY CPU @ 2.50GHz
# cpuid : GenuineIntel,6,85,7

What did you do?

running my program

What did you expect to see?

lower system cpu usage.

What did you see instead?

system cpu cost about 30 core.
user cpu cost is only 60 core!

截屏2022-08-18 下午12 58 05

i use perf to record callstack and tran it to pprof.

the pprof top means that function native_queued_spin_lock_slowpath cost most cpu.
截屏2022-08-18 下午12 54 31

hear is the pprof flamegraph, seems that runtime.freespan is the reason.
截屏2022-08-18 下午12 53 18

the memory usage of my machine.

the pprof file:
cpu.pprof.gz

@gopherbot gopherbot added the compiler/runtime Issues related to the Go compiler and/or runtime. label Aug 18, 2022
@joedian joedian added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Aug 18, 2022
@seankhliao seankhliao added this to the Unplanned milestone Aug 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler/runtime Issues related to the Go compiler and/or runtime. NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
None yet
Development

No branches or pull requests

4 participants