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.findrunable cost 23% of cpu prof #22829

Closed
xuewindy opened this issue Nov 21, 2017 · 1 comment
Closed

runtime.findrunable cost 23% of cpu prof #22829

xuewindy opened this issue Nov 21, 2017 · 1 comment

Comments

@xuewindy
Copy link

xuewindy commented Nov 21, 2017

Please answer these questions before submitting your issue. Thanks!

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

go1.8.0

Does this issue reproduce with the latest release?

no

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

GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/data12/home/xuegeng/go"
GORACE=""
GOROOT="/opt/tiger/go/go1.8.0"
GOTOOLDIR="/opt/tiger/go/go1.8.0/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build643110445=/tmp/go-build -gno-record-gcc-switches"
CXX="g++"
CGO_ENABLED="1"
PKG_CONFIG="pkg-config"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"

What did you do?

i run a mysql proxy ,which handle muti client request and sent these request to backend mysql.

i didn;t confrontend a error, but just the runtime.findrunable() func cost 23% cpu when i use pprof moniter my app.

What did you expect to see?

What did you see instead?

2017-11-21 18 06 56

![Uploading runtime.findrunable .png…]()

i see that runtime.findrunable() cost many cpu ,and most of them b used by net_poll and runqsteal , so i wander how should i do to reduse these coasts

most of my goruntime is waiting in
net.runtime_pollWait+0x58 (5849/5894)
in the most of time

@bradfitz
Copy link
Contributor

There is work currently happening at improving some of this in Go master (Go 1.10).

Please try the master branch and report any problems. (We won't be backporting performance things back to Go 1.8)

Thanks!

(I'm going to close this bug for now.)

@golang golang locked and limited conversation to collaborators Nov 21, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants