简体   繁体   中英

profiling golang runtime.systemstack

I have a networking app written in go. the business logic isn't important.
The problem is I'm struggling to utilize the full capabilites of my machine
and when I profile the applicaiton most of the time is spent in runtime stuff. It seems that ALOT of time is spent under runtime.systemstack
I don't understand what it means or how to increase performance.
I add the profiling of the related slow execution methods.
svg file

If you did cpu profiling ( go test -cpuprofile ), issue 10609 mentioned "runtime: cpu profile is not useful due to systemstack" ( fixed here , for Go 1.5 )

You can have a more interesting view with the recent Go 1.10 trace: see " Using Go 1.10 new trace features to debug an integration test "

go test -trace trace.out
go tool trace -http=localhost:8080 trace.out

See an example here . You will see clearly the inactivity period for each of your processors.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM