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
net/http: excessive mutex contention #3946
Labels
Comments
connectMethod.String() looks like a particularly heavy operation (calling URL.String and strings.Join), could the attached patch be enough to solve the problem ? Attachments:
|
http://golang.org/cl/6454142 I take your patch as a base, and added some more optimizations. I did not measure them separately, but the resulting speedups look quite impressive (-40%). |
New contention profile after applying http://golang.org/cl/6454142 Attachments:
|
This issue was closed by revision 20f6a8f. Status changed to Fixed. |
dvyukov
added a commit
that referenced
this issue
May 11, 2015
««« backport 43568ec5cf55 net/http: reduce mutex contention benchmark old ns/op new ns/op delta BenchmarkClientServerParallel 155909 154454 -0.93% BenchmarkClientServerParallel-2 86012 82986 -3.52% BenchmarkClientServerParallel-4 70211 55168 -21.43% BenchmarkClientServerParallel-8 80755 47862 -40.73% BenchmarkClientServerParallel-12 77753 51478 -33.79% BenchmarkClientServerParallel-16 77920 50278 -35.47% The benchmark is https://golang.org/cl/6441134 The machine is 2 x 4 HT cores (16 HW threads total). Fixes #3946. Now contention moves to net.pollServer.AddFD(). R=bradfitz CC=bradfitz, dave, dsymonds, gobot, golang-dev, remyoudompheng https://golang.org/cl/6454142 »»»
This issue was closed.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Attachments:
The text was updated successfully, but these errors were encountered: